0.1.1 • Published 11 years ago
broccoli-umd v0.1.1
broccoli-umd
The broccoli-umd plugin exposes libumd functionality to wrap .js files.
This plugin is designed to compile a single, primary input file into a single output file.
This code is based heavily on broccoli-less-single and grunt-umd
Installation
npm install --save-dev broccoli-umdUsage
var umdify = require('broccoli-umd');
var outputTree = umdify(sourceTrees, inputFile, outputFile, options)sourceTrees: An array of trees that act as the search paths forinputFile. If you have a single tree, pass[tree].inputFile: Relative path of the main.jsfile to umdify. This file must exist in one of thesourceTrees.outputFile: Relative path of the output .js file.options: A hash of options for libumd.
Example
var livestamp = umdify("bower_components/livestampjs", "livestamp.js", "livestamp.js", {
deps: {
'default': ['jQuery', 'moment'],
amd: ['jquery', 'moment']
}
});