Skip to content

Compiler directives #468

@TrevorBurnham

Description

@TrevorBurnham

In large projects I inevitably wind up with some files where it would be nice to compile them with --no-wrap. Now that #-style comments are omitted from JavaScript output, perhaps it would make sense to use a syntax along the lines of

# flags: no-wrap

for such directives. Or maybe the syntax should be more clearly differentiated from comments aimed at humans, e.g. starting with #!.

I would allow this after human-readable comments, but before any expressions. There may be other directives in the future (perhaps a way of including another file, or a flag that adds comments to the output with the line numbers of the original CoffeeScript), but this is the only one that I feel a real need for, and it should be fairly easy to implement (I'd be happy to write the patch myself if there's support for it). Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions