Wraps .coffee and .js files into CommonJS modules for client-side usage.
CoffeeScript JavaScript
Switch branches/tags
Pull request Compare This branch is 16 commits ahead, 2 commits behind vjkaruna:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tasks
test
.gitignore
Gruntfile.coffee
LICENSE
README.md
package.json

README.md

Deprecated in favor of grunt-browserify

grunt-commonjs-coffee

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 Gruntfile.coffee:

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 brunch.io loads CommonJS packages.

Documentation

Configure which files to be copied in your initConfig:

grunt.initConfig

  # ... other configs

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

  # ... other configs

Contributing

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.

License

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

Licensed under the MIT license.