Scenario : I currently have to work on a Coffescript project that is (at the moment still) tied to using some outdated and long forgotten browserify predecessor.
Question : What is the best approach for creating source-maps for the resulting file that is created from compiled coffeescript ? Would I have to add sourcemap generation to the stitch processing itself using something like https://github.com/mozilla/source-map/ or is there a more high-level/generic approach that could be applied in this scenario ?
For adding a source-map
for coffee-script just use the node-js command line tool from the coffee-script
package.
Example : (from coffeescript.org )
Compile a directory tree of .coffee
files in src
into a parallel tree of .js
files in lib, plus creating the source map files:
coffee --compile --map --output lib/ src/
Personally I would do something like described in this tutorial - creating a sublime workflow .
Hope this helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.