Skip to content

Custom __pragma__ aliases or definitions #551

@kiwi0fruit

Description

@kiwi0fruit

Sometimes it's convenient to have a custom pragma aliases: #404 (comment)

Or may be it would also be useful to define something more complex than such aliases.

PS

This thought started here. So I guess that comments are no longer relevant.

Like

__pragma__('jsx', x)

means

__pragma__('xtrans', 'jsx-transform --factory React.createElement', '{}', x)

?

Even that the previous can now be written as:

__pragma__('xtrans', None, '{}', x)

When using the

transcrypt --xtrans="jsx-transform --factory React.createElement"

Command line switch it still looks not neat enough.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions