Skip to content

Commit

Permalink
[tools] Bring back postinstall script
Browse files Browse the repository at this point in the history
See 3357117329a8c477ced52686e74a7a9dc7cb9b5
  • Loading branch information
tonyganch committed Nov 17, 2016
1 parent 272705c commit 1df32b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"init": "bash ./scripts/init.sh",
"lint": "bash ./scripts/lint.sh",
"log": "bash ./scripts/log.sh",
"postinstall": "bash ./scripts/postinstall.sh",
"prepublish": "bash ./scripts/prepublish.sh",
"postpublish": "bash ./scripts/postpublish.sh",
"test": "bash ./scripts/test.sh",
Expand Down
12 changes: 12 additions & 0 deletions scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

if [[ ! -d 'lib' ]]; then
npm i webpack@^1.12.2
npm i json-loader@^0.5.3
npm i babel-core@^6.18.2
npm i babel-preset-es2015@^6.18.0
npm i babel-plugin-add-module-exports@^0.2.1
npm i babel-loader@^6.2.7

./node_modules/.bin/webpack --module-bind "json=json" --module-bind "js=babel-loader?{'plugins': ['add-module-exports'], 'presets': [['es2015', {'loose': true}]]}"
fi

0 comments on commit 1df32b0

Please sign in to comment.