assets-shared-deps
v1.0.4
Published
assets shared dependencies
Readme
Assets Shared Dependencies
A small library that merges shared dependencies with local dependencies. Generates a new package.json.
Installation
npm install assets-shared-depsUsage
There are two different ways to set this up.
Command Line
Make sure you have a local package.json setup, otherwise a pacakge.json will be created with the name set to "assets-shared-deps".
# grab the module first
npm install assets-shared-deps
# rewrite your local package.json by merging it with shared-deps package.json
node ./node_modules/assets-shared-deps/index.js
# after the rewrite, install all modules
npm installNPM preinstall hook
Create a NPM preinstall hook in your local package.json.
"scripts": {
"preinstall": "npm install assets-shared-deps && node ./node_modules/assets-shared-deps/index.js"
}This command will run the following in sequential order.
- Grabs the shared dependencies from shared-deps node module.
- Rewrites your local package.json by merging with shared package.json.
- Runs npm install on the newly created local package.json.
