Last Updated: February 25, 2016
·
481
· urbansky

IcedCoffeeScript automatic compiling with npm

Everytime you change a ICS file you have to compile it. Following command compiles several ICS files in different directories::

iced -c *.iced ./routes/*.iced ./lib/domain/*.iced

You can put this command to your package.json:

...
"scripts": {
  "start": "node app.js",
  "prepublish": "iced -c *.iced ./routes/*.iced ./lib/domain/*.iced"
},
...

And now you can type the short command:

npm install

for compiling, or:

npm install; npm start

for compiling and starting.