Grunt task to automatize the use of browserify for NPM modules in your AMD/RequireJS projects.
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, install this plugin with this command:
npm install grunt-npm-amd --save-dev
npm_amd task is run it bundles installed NPM modules with browserify via NPM-AMD and merges the bundle paths into the
paths property of your AMD config file. Also it will detect AMD entries and just point the configuration to it, instead of doing pointless browserifying ;)
You trigger this task from another task in your Gruntfile or through the CLI:
Specify a relative path to your RequireJS config.
Make sure to specify the
baseUrl property in your config file if you want to use relative paths.
baseUrl: "baseUrl"paths: "paths"
Property names to look for when patching up the config file. Declare this to support other AMD loaders.
Watch that space.
config. For example, for RequireJS you need to have at least the following: