Copy the contents of an NPM package into a local directory.
Vendorizing is the practice of "including dependencies inside your own source tree as if they were part of your application" (via Jeff Forcier).
To vendorize the request
library:
npx vendorize request
This will add the contents of the request
library to a local vendor
directory.
This results in the following directory structure:
- vendor
- request
- lib
- CHANGELOG.md
- index.js
- LICENSE
- package.json
- README.md
- request.js
You can also specify the name of the vendor directory (which defaults to "vendor"):
npx vendorize request libraries
This will add the request
package to a local libraries
directory.
You can install vendorized packages by running:
npm install file:vendor/[package-name]
This will symlink the package into node_modules
.