Port npm update task.

This commit is contained in:
ccd0 2016-04-17 03:44:55 -07:00
parent 4104aac9c8
commit 1f9787824e
2 changed files with 16 additions and 1 deletions

View File

@ -14,7 +14,7 @@ else
ESC_DOLLAR = \$$
endif
npgoals := clean cleanrel cleanweb cleanfull tag $(foreach i,1 2 3 4,bump$(i)) beta stable web
npgoals := clean cleanrel cleanweb cleanfull tag $(foreach i,1 2 3 4,bump$(i)) beta stable web update
ifneq "$(filter $(npgoals),$(MAKECMDGOALS))" ""
.NOTPARALLEL :
endif
@ -309,3 +309,7 @@ web : index.html distready
cd dist && git merge --no-commit -s ours master
cd dist && git checkout master README.md index.html web.css img
cd dist && git commit -am "Update web page."
update :
npm install --save-dev $(shell node tools/unpinned.js)
npm shrinkwrap --dev

11
tools/unpinned.js Normal file
View File

@ -0,0 +1,11 @@
var fs = require('fs');
var pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
console.log(
Object.keys(pkg.devDependencies).filter(
name => /^\^/.test(pkg.devDependencies[name])
).map(
name => `${name}@latest`
).join(' ')
);