1.1.1 • Published 9 years ago
npm-packer v1.1.1
Produces zero-dependencies node modules
Installation
$ npm install -g npm-packerUsage
npm-packer <source> <target> [--yarn]<source>can be either existing directory or npm package prefixed withnpm:<target>must be non-existing directory- if
--yarnis used, packer uses yarn instead of npm for bundling
npm-packer . dist
npm-packer npm:jquery jquery-packed
npm-packer npm:jquery jquery-packed --yarnHow it works?
- Runs "npm pack" on module and copies result to
- Performs "npm install --production" on
- Copies installed modules to "/vendor/node_modules"
- Rewrites all require(...) calls
- Removes "dependencies" from package.json
The bundle in <target> should be ready for publication with npm publish
License
MIT © Adam Stankiewicz