JSPM

  • Created
  • Published
  • Downloads 54060
  • Score
    100M100P100Q145356F

Grunt task for node-browserify

Package Exports

  • grunt-browserify/tasks/browserify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grunt-browserify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

build status

grunt-browserify

Grunt task for node-browserify. Current version: 0.2.x.

Getting Started

This plugin requires Grunt ~0.4.0 and Node >=0.10.x.

Install this grunt plugin with:

npm install grunt-browserify —save-dev

Then add this line to your project's grunt.js Gruntfile:

grunt.loadNpmTasks('grunt-browserify');

Documentation

Run this task with the grunt browserify command. As with other Grunt plugins, the src and dest properties are most important: src will use the Grunt glob pattern to specify files for inclusion in the browserified package, and dest will specify the outfile for the compiled module.

Options

ignore

Type: [String]

Specifies files to be ignored in the browserify bundle.

alias

Type: [String:String] or comma-separated String

Browserify can alias files to a certain name. For example, require(‘./foo’) can be aliased to be used as require(‘foo’). Aliases should be specified as fileName:alias.

external

Type: [String]

Specifies files to be loaded from a previously loaded, “common” bundle.

options:debug

Type: Boolean

Enable source map support.

###Usage To get things running, add the following entry to grunt.initConfig():

    browserify: {
      src: [‘client/scripts/**/*.js`],
      dest: ‘build/module.js’
    }

More complicated use cases can be found within this projects own Gruntfile.

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.

Release History

v0.1.0

  • Initial release

v0.1.1

  • Properly support compact and full grunt task syntax

v0.2.0

  • Add support for Browserify 2

License

Copyright (c) 2013 Justin Reidy Licensed under the MIT license.