Reputation: 55029
Here's how I compile:
str = CoffeeScript.compile(fs.readFileSync(file, "ascii"))
How do I get sourcemaps to work with this.
Upvotes: 0
Views: 73
Reputation: 5515
CoffeeScript.compile
takes an object as the second argument which has valid values as seen on the CoffeeScript website under 'Usage'
For your case, you want to use:
str = CoffeeScript.compile(fs.readFileSync(file, "ascii"), { map: true });
Upvotes: 1