1.7.8 • Published 5 years ago

amd-bundle v1.7.8

Weekly downloads
4
License
AGPL-3.0
Repository
github
Last release
5 years ago

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.

NPM Dependency Build Status

NPM

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/file

amd-bundle will

  1. start bundling from the entry point path/to/project/source/entry.js

  2. write into path/to/project/bundle/file.js with only one define('file', [ ]) and global.file definition, just like UMD style

  3. treat ${process.cwd()}/node_modules/${module_full_name} as a user's module to pack in

  4. generate file.min.js & file.js.map in path/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 information

Configuration

Example

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

Bundle ECMAScript 6+ codes

Typical Cases

  1. iQuery.js (where the prototype of amd-bundle came from)

  2. WebCell (where v1.0 rewritten out)

  3. WebCell DevCLI (where v1.3+ came out)

More use case

1.7.8

5 years ago

1.7.7

5 years ago

1.7.6

5 years ago

1.7.5

5 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.5.0

6 years ago

0.4.3

6 years ago

0.4.2

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago