Deprecated in favor of grunt-browserify

npm install grunt-commonjs-coffee
12 downloads in the last week
15 downloads in the last month

Deprecated in favor of grunt-browserify


Wraps .coffee and .js files into CommonJS modules for client-side usage.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-commonjs-coffee --save-dev

Then add this line to your project's

grunt.loadNpmTasks 'grunt-commonjs-coffee'

CommonJS loader

You'll need a loader to detect your wrapped packages. You can use this simple CommonJS loader which is based off how loads CommonJS packages.


Configure which files to be copied in your initConfig:


  # ... other configs

  # wrap my modules with define
      cwd: 'assets/'
      src: ['**/*.coffee', '**/*.js']
      dest: 'dist/'

  # ... other configs


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.


Copyright (c) 2012 Team Delicious, AVOS Systems Inc., Derek Petersen

Licensed under the MIT license.

npm loves you