grunt's task for concatenating CoffeeScript files that have 'require' directive using Snockets
grunt plugin inspired by Sprockets to compile CoffeeScripts that has sprockets-style comments to indicate dependencies.
In your CoffeeScript files, write Sprockets-style comments to indicate dependencies, e.g.
#= require dependency
If you want to bring in a whole folder of scripts, use
#= require_tree dir
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-coffee-chain --save-dev
In your project's Gruntfile, add a section named
coffeeChain to the data object passed into
(Not yet implemented)
A boolean value that is used to clean resulting CoffeeScript from useless code that coffee compiler adds.
In these examples, the default options are used to compile coffee scripts to js without cleaning them`
In this example, the custom options are used to compile coffee scripts to js cleaning them`
In this example, the custom options are used to compile coffee scripts to js minifying and cleaning them`
gruntinitConfigcoffeeChain:dist:options:clean: truesrc: "app/main.coffee"dest: "dist/index.js"
This application is written in CoffeeScript with sprockets-style comments to indicate dependencies and so
When you change something in this app it is better to compile tests using previous version of this app as we use coffee_chain to compile coffee_chain to itself and need to protect us from testing application using incorrectly compiled tests. So to run tests I have added a simple script that should be used instead of 'npm test' command:
version 1.2.5 - Current. Updated coffeeChain to save all data to a temp file and only when everything is complete overwrite the destination file
version 1.2.2 - the same as previous version but compiled from coffee to js using coffeeChain 1.2.1
version 1.2.1 - refactored from scratch. It was compilled in common node.js way
Note: versions 0.1.2 - 1.2.0 and v1.2.3 - 1.2.4 : some of them are incorrect and may be broken. Use any higher version