grunt-browser-dependencies
Download js files from the web, name them what you want and where you want, keep browser dependencies inside package.json if you want.
Getting Started
This plugin requires Grunt ~0.4.0
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, you may install this plugin with this command:
npm install grunt-browser-dependencies --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
grunt-js-template task
Run this task with the grunt browserDependencies
command.
Example config
browserDependencies: gruntfilebrowserDependencies
grunt; grunt; // or in your package.json (browserify-shim config optional): "browserDependencies": "options": {} "main": "dir": "client_modules" "files": "jquery-2.0.3.js": "http://code.jquery.com/jquery-2.0.3.js" "require_by": "jquery" "exports": "$" "depends": {} "enquire-2.0.0.js": "https://raw.github.com/WickyNilliams/enquire.js/v2.0.0/dist/enquire.js" "require_by": "enquire" "depends": {} "exports":"enquire" // Then in your gruntfile using grunt-browserify: browserify: build: src: 'client/js/init.js' dest: 'built/static/js/<%= pkg.name %>.js' options: transform: 'hbsfy' 'requireify' 'promethify' shim: { var shim = {}; var dir = gruntfilebrowserDependenciesmaindir; gruntfilebrowserDependenciesmainfiles ; return shim; } // Allows one central config for all external client side js that needs to be built.