You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
851 B
21 lines
851 B
#!/bin/sh |
|
|
|
die () { echo "$@" ; exit 1; } |
|
|
|
. ../../../nvm.sh |
|
|
|
nvm use 0.10.28 |
|
|
|
EXPECTED_PACKAGES="autoprefixer bower david eslint grunt-cli grunth-cli http-server jshint marked node-gyp npm recursive-blame uglify-js yo" |
|
|
|
npm install -g --quiet $EXPECTED_PACKAGES |
|
|
|
nvm use 0.10.29 |
|
ORIGINAL_PACKAGES=$(npm list --global --parseable --depth=0 2> /dev/null | tail -n +2 | grep -o -e '/[^/]*$' | cut -c 2- | sort | uniq | xargs) |
|
|
|
nvm copy-packages 0.10.28 |
|
FINAL_PACKAGES=$(npm list --global --parseable --depth=0 2> /dev/null | tail -n +2 | grep -o -e '/[^/]*$' | cut -c 2- | sort | uniq | xargs) |
|
|
|
[ "$FINAL_PACKAGES" = "$EXPECTED_PACKAGES" ] || die "final packages ($FINAL_PACKAGES) did not match expected packages ($EXPECTED_PACKAGES)" |
|
[ "$ORIGINAL_PACKAGES" != "$FINAL_PACKAGES" ] || die "original packages matched final packages ($ORIGINAL_PACKAGES)" |
|
|
|
|