Why builder-amd?
Use builder-amd
to generate the JS bundle of an AMD modular project.
It's ideal for applications that builds bundles on the fly using Node.js.
Usage
npm install builder-amd
var fs = ;var amdBuilder = ; var files = "main.js": fs "foo.js": fs "bar.js": fs ... ;
API
amdBuilder( files, requirejsConfig, callback )
files Object containing (path, data) key-value pairs, e.g.:
{
<path-of-file-1>: <data-of-file-1>,
<path-of-file-2>: <data-of-file-2>,
...
}
requirejsConfig Object require.js build configuration.
callback Function called with three arguments: null or an Error object, a String with the built css content, an Object with the cloned built files structure.
Test
npm test
License
MIT © Rafael Xavier de Souza