broccoli-umd
v0.1.1
Published
libumd wrapper for Broccoli
Downloads
8
Readme
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-umd
Usage
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.js
file 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']
}
});