Today i started to work for GruntJS integration to the Weber framework. It was old issue #25 and now grunt integration is in master.
In this post I will tell how to use CoffeeScript with Weber.
First of let's create new weber project with grunt:
package.json:
Gruntfile.js:
Let's add "grunt-contrib-coffee": "0.4.0" to the package.json, execute sudo npm install and update our Gruntfile.js:
Now create public/coffee/app.coffee and add some code:
Now just execute:
If you will have any questions/suggestions/issues write us to the Weber's issues. We need contributors.
mix weber.new /home/user/NewProject --gruntYou will see standard weber project structure, but with 2 new files:
- package.json
- Gruntfile.js
package.json:
Gruntfile.js:
Let's add "grunt-contrib-coffee": "0.4.0" to the package.json, execute sudo npm install and update our Gruntfile.js:
Now create public/coffee/app.coffee and add some code:
Now just execute:
grunt coffeeAnd you will see /public/js/app.js with compiled coffeescript. Very simple! That's all.
If you will have any questions/suggestions/issues write us to the Weber's issues. We need contributors.
Comments