Skip to content

Can the compile method return a map? #38

@justinwyllie

Description

@justinwyllie

Running this from the command line I can pass the -m flag and it will produce a source map. e.g. cjsx -cm will produce both the .js file and the source map file.

However; running this in a node (in fact Jest) context I want to do:

const coffeereact = require('coffee-react');
var compiled = coffeereact.compile(src, {bare: true, map: true});

And have complied have both the compiled JS code and the source map. I want to do this so I can write the source map to the file system for later use.

At the moment putting the map: true option in this context seems to have no effect.

I'm not sure if this is possible? Or if not - perhaps this is a feature request?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions