npm-packer
v1.1.1
Published
Produces zero-dependencies node module
Downloads
12
Readme
Produces zero-dependencies node modules
Installation
$ npm install -g npm-packer
Usage
npm-packer <source> <target> [--yarn]
<source>
can be either existing directory or npm package prefixed withnpm:
<target>
must be non-existing directory- if
--yarn
is used, packer uses yarn instead of npm for bundling
npm-packer . dist
npm-packer npm:jquery jquery-packed
npm-packer npm:jquery jquery-packed --yarn
How 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