Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Compile CoffeeScript files to JavaScript -- you bring the compiler!
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
tasks
test
.gitattributes
.gitignore
.jshintrc
.travis.yml
AUTHORS
CHANGELOG
CONTRIBUTING.md
Gruntfile.js
LICENSE-MIT
README.md
package.json

README.md

grunt-custom-coffee

Build Status Dependency Status

Compile CoffeeScript files to JavaScript -- you bring the compiler!

About

This plugin is a copy of grunt-contrib-coffee with one difference:

      return (options['compiler'] || require('coffee-script')).compile(code, options);

That line from the task file allows you to provide your own "CoffeeScript" compiler.

Most of the time, you would use this task to gain control of the version of CoffeeScript that is used to compile your .coffee or .litcoffee files. For instance, you may require a specific version, or you may require a customized compiler, such as the hleumas fork which has additional support for Google Closure Library. It doesn't really matter what you specify as your compiler as long as it does what you want when you call compile(code, options) on it. :)

Please see the grunt-contrib-coffee task for full documentation. The only difference here is that you may use the compiler option to override the default compiler:

compiler

Type: object Default: undefined

If provided, the compiler is expected to be an instance of the npm package 'coffee-script' or something that behaves as if it were. This can be used to build with an alternate version of coffee-script or to build with a fork of coffee-script. Typically, the user will specify the compiler using compiler: require('coffee-script') where an alternate version of coffee-script has been specified by the package as a direct dependency.

Example

coffee: { alternate_compiler: { options: { compiler: require('coffee-script') }, expand: true, cwd: 'src', dest: 'build', src: ['*/.coffee'], ext: '.js' } }

Release History

  • 2013-10-01   v0.0.1   Initial release -- equivalent to grunt-contrib-coffee v0.7.0.
Something went wrong with that request. Please try again.