feature/UX-11 * Fix for a bug combined with a 'feature' in npm that was breaking the build

This commit is contained in:
Josh McDonald 2016-03-07 11:29:26 +11:00
parent ee52175405
commit 8c895d5e02
3 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ node_modules
work
app.properties
npm-debug.log

View File

@ -4,7 +4,7 @@
"description": "Styles, assets, and React classes for Jenkins Design Language",
"main": "dist/js/index.js",
"scripts": {
"prepublish": "npm run grunt",
"prepublish": "./pre-publish.sh",
"grunt": "grunt",
"test": "grunt test"
},

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -e
# This fix makes baby Jesus cry: We need to test for "node_modules" because npm will do
# a "prepublish" when pulling in a local dep, but doesn't run "install" first...
# It *also* liket to run "prepublish" after "install" which gives us a loop.
test -d "node_modules" || npm install
npm run grunt