Search code examples
javascriptnode.jscoffeescriptlessv8

Node app auto reload, auto compile coffee script and auto compile less css


does anyone know how can I do this? I've found nodemon to monitor the folder for changes and restart the node app on every change. I also want a way to recompile .coffee and .less files automaticaly.

Could anyone give me a hint?


Solution

  • Are you trying to use Coffeescript in a Node app? If so just point nodemon to your coffee file, and assuming you have a reasonably modern version of Node it should Just Work:

    nodemon your_node_program_file.coffee

    If you have Coffeescript you need to compile for other purposes (for example you use it on the frontend) you could use GruntJS and a GruntJS plugin to compile Coffeescript to Javascript