musictheory / NilScript

Objective-C-style language superset of JavaScript with a tiny, simple runtime
Other
50 stars 5 forks source link

SourceMap support #47

Closed IngwiePhoenix closed 8 years ago

IngwiePhoenix commented 9 years ago

Is it possible to retrive a sourcemap from an OJ file?

My situation is that I am writing a loader for webpack. It gives me the ability to give back a SourceMap for debugging purposes. There also is a flag a loader can access to see if such should be made.

I have the file path, and the contents of the current code at hand. What can I do to get a SourceMap from it?

iccir commented 9 years ago

Long term, this needs to be cleaned up and documented. Short term, specifying source-map-file and source-map-root as options to ojc.compile will add a map key to the result object (see bin/ojc)