unamd
v1.0.3
Published
browserify v2 plugin for transforming AMD to CommonJS.
Downloads
858
Maintainers
Readme
unAMD
Transform AMD files to CommonJS format.
Usage
browserify -t unamd source.js -o dest.js
or
browserify -t [unamd --log] source.js -o dest.js
in order to console.log which files are being transformed.
If you want to do further piping, you probably don't want to use the --log
option.
Configuration
In package.json, add browserify.unamd["require.conf"] property. It will use that to read the "paths" and "baseUrl".
{
"name": "your-project",
"version": "0.0.0",
"browserify": {
"unamd": {
"require.conf": "src/js/require.conf"
}
}
}
Just in case, you can configure "baseUrl" for yourself:
{
"name": "your-project",
"version": "0.0.0",
"browserify": {
"unamd": {
"require.conf": "src/js/require.conf",
"baseUrl": "src/js"
}
}
}