Last Updated: February 25, 2016
·
700
· 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.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside