Skip to content

Instantly share code, notes, and snippets.

@pgarrison
Created November 1, 2016 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgarrison/4b447ed651c18c62c137030f25ad7c9a to your computer and use it in GitHub Desktop.
Save pgarrison/4b447ed651c18c62c137030f25ad7c9a to your computer and use it in GitHub Desktop.
npm shrinkwrap add devDependencies by default
$ vim package.json
$ npm i
tmp@1.0.0 /home/philip/workspace/aggie_ws/tmp
├── ms@0.7.2
└── wrappy@1.0.2
npm WARN tmp@1.0.0 No description
npm WARN tmp@1.0.0 No repository field.
$ npm shrinkwrap
wrote npm-shrinkwrap.json
{
"name": "tmp",
"version": "1.0.0",
"dependencies": {
"ms": {
"version": "0.7.2",
"from": "ms@>=0.7.2 <0.8.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz"
},
"wrappy": {
"version": "1.0.2",
"from": "wrappy@>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"dev": true
}
}
}
{
"name": "tmp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"wrappy": "^1.0.2"
},
"dependencies": {
"ms": "^0.7.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment