From c21ad4cb279d808fd08cd33b583a7605ac9f1a3b Mon Sep 17 00:00:00 2001 From: Matthieu Lux Date: Tue, 25 Aug 2015 09:21:15 +0200 Subject: [PATCH 1/2] add a script to update test shrinkwrap --- package.json | 3 ++- scripts/update-test-shrinkwrap.sh | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 scripts/update-test-shrinkwrap.sh diff --git a/package.json b/package.json index 0b33a5bc..b1014165 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "scripts": { "pretest": "./scripts/prepare-test.sh", "test": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- test/node test/template && ./node_modules/.bin/mocha test/inception/test-inception.js -ig protractor", - "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" + "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", + "update-shrinkwrap": "./scripts/update-test-shrinkwrap.sh" }, "dependencies": { "chalk": "~1.1.0", diff --git a/scripts/update-test-shrinkwrap.sh b/scripts/update-test-shrinkwrap.sh new file mode 100755 index 00000000..7f0994f4 --- /dev/null +++ b/scripts/update-test-shrinkwrap.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +rm -rf test/tmp/deps/node_modules test/tmp/deps/package.json test/tmp/deps/npm-shrinkwrap.json + +node test/template-cli.js prepare + +node test/template-cli.js deps + +cd test/tmp/deps + +npm install + +npm shrinkwrap + +cp ./npm-shrinkwrap.json ../../npm-shrinkwrap.json From 036e1a7e608892885337daaf04c099f080336aa0 Mon Sep 17 00:00:00 2001 From: Matthieu Lux Date: Tue, 25 Aug 2015 09:58:57 +0200 Subject: [PATCH 2/2] add missing --dev option to shrinkwrap --- scripts/update-test-shrinkwrap.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/update-test-shrinkwrap.sh b/scripts/update-test-shrinkwrap.sh index 7f0994f4..05f1f90b 100755 --- a/scripts/update-test-shrinkwrap.sh +++ b/scripts/update-test-shrinkwrap.sh @@ -4,14 +4,12 @@ set -e rm -rf test/tmp/deps/node_modules test/tmp/deps/package.json test/tmp/deps/npm-shrinkwrap.json -node test/template-cli.js prepare - node test/template-cli.js deps cd test/tmp/deps npm install -npm shrinkwrap +npm shrinkwrap --dev cp ./npm-shrinkwrap.json ../../npm-shrinkwrap.json