Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Using with CoffeeScript

Alexandros Marinos edited this page Oct 19, 2013 · 1 revision

To use with a requirejs config file in CoffeeScript, do the following:

Create a grunt task that consists of the following tasks:

  1. Using grunt-coffee, compile the requirejs config file from coffee to js. Very important: use the bare:true option.

  2. run the bower task

  3. using grunt-js2coffee, compile the js config file back to coffee

  4. using grunt-clean remove the js config file

All done! the grunt-bower-requirejs task has done its work and you can continue working.

The compromise is that you lose any comments in the file, as well as getting the default code style of js2coffee, but if you can live with that, it works! Both these limitations may be fixable, but I haven't gotten around to it.

Clone this wiki locally