The basic installation of package.json for a traditional directory structure looks like
"scripts": { "prepublish": "coffee --compile --output lib/ src/" }
If you also want to compile coffeescript before running the tests, most likely you will want to output the compilation output as a reusable script:
"scripts": { "pretest": "npm run compile", "prepublish": "npm run compile", "test": "mocha", "compile": "coffee --compile --output lib/ src/" }
hurrymaplelad 04 Oct '14 at 19:54 2014-10-04 19:54
source share