Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

amd-bundle

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amd-bundle

A dual-use tool for bundling up AMD modules, which is much easier to use than r.js with Almond or AMDclean

Source
npmnpm
Version
1.3.5
Version published
Weekly downloads
32
77.78%
Maintainers
1
Weekly downloads
 
Created
Source

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

NPM

Basic

cd path/to/project/root

npm install amd-bundle --save-dev

amd-bundle -a \
    path/to/project/source/entry \
    path/to/project/bundle/file

amd-bundle will

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

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

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

More options

Command-line

amd-bundle --help

Usage: index [options] <entry file> [bundle file]

Options:

  -V, --version                  output the version number
  -a, --include-all              Bundle all dependencies (include those in "./node_modules/")
  -m, --module-map <name pairs>  Map to replace some dependencies to others (For example:  old_1:new_1,/some_/i:new_2)
  -c, --command-line             Bundle as a command script
  -s, --std-out                  Write into "stdout" without logs
  -h, --help                     output usage information

JS Module

https://techquery.github.io/AMD_bundle.js/class/source/Package.js~Package.html#instance-method-bundle

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

  • Development dependency: Babel

  • NPM-scripts reference: WebCell

Typical Cases

Keywords

javascript

FAQs

Package last updated on 05 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts