Skip to content

Commit

Permalink
pin node packages; switch to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
mstbbs committed Jul 12, 2018
1 parent ce2947e commit 35701e6
Show file tree
Hide file tree
Showing 4 changed files with 5,294 additions and 41 deletions.
8 changes: 8 additions & 0 deletions local/bin/sh/preinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# test if we are wrongly running `npm install` instead of yarn.
if ! [[ $npm_config_user_agent == yarn* ]]
then
echo "npm got replaced with yarn: install it with 'sudo npm install -g yarn' and run 'yarn' instead."
exit 1
fi
16 changes: 5 additions & 11 deletions local/bin/sh/run-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ if [ ${RUN_SERVER} == true ]; then
# gulp
if [ ${RUN_GULP} == true ]; then
echo "checking that node modules are installed and up-to-date"
if [ -d node_modules ]; then
MISSING=`npm ls --parseable=true 2>&1 >/dev/null | grep -oc "missing:"`
if [ "$MISSING" -gt 0 ]; then
npm install || echo "arch conflicting detected. removing modules and trying again" && rm -rf node_modules && npm install
fi
else
npm install || echo "arch conflicting detected. removing modules and trying again" && rm -rf node_modules && npm install
fi
echo "starting gulp build"
gulp build
sleep 5
npm --global install yarn && \
npm cache clean --force && yarn install --frozen-lockfile
echo "starting gulp build"
gulp build
sleep 5
fi

# integrations
Expand Down
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,37 @@
"node": ">= 4.5"
},
"dependencies": {
"algoliasearch": "^3.24.6",
"bootstrap": "^4.0.0-beta.2",
"browser-sync": "^2.18.13",
"del": "^2.2",
"gulp": "^3.9",
"gulp-autoprefixer": "^4.0.0",
"gulp-changed": "^3.1.1",
"gulp-concat": "^2.6",
"gulp-cssnano": "^2.1",
"algoliasearch": "3.24.6",
"bootstrap": "4.0.0-beta.2",
"browser-sync": "2.18.13",
"del": "2.2.2",
"gulp": "3.9.1",
"gulp-autoprefixer": "4.0.0",
"gulp-changed": "3.1.1",
"gulp-concat": "2.6.1",
"gulp-cssnano": "2.1.3",
"gulp-hash": "4.1.1",
"gulp-if": "^2.0",
"gulp-jshint": "^2.0",
"gulp-plumber": "^1.0",
"gulp-rename": "^1.2",
"gulp-sass": "^3.0",
"gulp-uglify": "^3.0.0",
"jquery": "^3.2.1",
"jshint": "^2.9",
"jshint-stylish": "^2.0",
"lazypipe": "^1.0",
"lazysizes": "^4.0.1",
"merge-stream": "^1.0",
"minimist": "^1.1",
"mixitup": "^3.2.2",
"mousetrap": "^1.6.1",
"node-sass": "^4.7.2",
"picturefill": "^3.0.2",
"popper.js": "^1.13.0",
"run-sequence": "^1.1.4",
"stickyfilljs": "^2.0.3",
"gulp-if": "2.0.2",
"gulp-jshint": "2.1.0",
"gulp-plumber": "1.2.0",
"gulp-rename": "1.3.0",
"gulp-sass": "3.2.1",
"gulp-uglify": "3.0.0",
"jquery": "3.2.1",
"jshint": "2.9.5",
"jshint-stylish": "2.2.1",
"lazypipe": "1.0.1",
"lazysizes": "4.0.1",
"merge-stream": "1.0.1",
"minimist": "1.1.0",
"mixitup": "3.2.2",
"mousetrap": "1.6.1",
"node-sass": "4.7.2",
"picturefill": "3.0.2",
"popper.js": "1.13.0",
"run-sequence": "1.1.4",
"stickyfilljs": "2.0.3",
"translate": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/translate-latest.tgz",
"traverse": "^0.6"
"traverse": "0.6.6"
}
}
Loading

0 comments on commit 35701e6

Please sign in to comment.