amd-bundle v1.7.8
AMD bundle
A multiple-use tool for bundling up AMD, CJS & ES 6 modules,
which is much easier to use than r.js with Almond or AMDclean.
Recommended Usage
Basic
cd path/to/project/root
npm install amd-bundle --save-dev
amd-bundle -a -m \
path/to/project/source/entry \
path/to/project/bundle/fileamd-bundle will
start bundling from the entry point
path/to/project/source/entry.jswrite into
path/to/project/bundle/file.jswith only onedefine('file', [ ])andglobal.filedefinition, just like UMD styletreat
${process.cwd()}/node_modules/${module_full_name}as a user's module to pack ingenerate
file.min.js&file.js.mapinpath/to/project/bundle/
More options
Command-line
amd-bundle --help
Usage: amd-bundle [options] <entry file> [bundle file]
Options:
-V, --version output the version number
-a, --include-all Bundle all dependencies (include those in "./node_modules/")
-m, --minify Generate minified source code & source map
-s, --std-out Write into "stdout" without logs
-h, --help output usage informationConfiguration
Key/value of option moduleMap is same as the basic parameters of String.prototype.replace().
JS Module
Advanced
Build standalone release files (Full source code, Minimized code & Source map) by executing a single command (npm run build).
Multiple bundles from one source
- NPM-scripts reference: iQuery.js
Bundle ECMAScript 6+ codes
Typical Cases
iQuery.js (where the prototype of
amd-bundlecame from)WebCell (where
v1.0rewritten out)WebCell DevCLI (where
v1.3+came out)
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
