File tree 2 files changed +34
-3
lines changed
2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ if [ -z " $1 " ]; then
4
+ echo " You must provide library path"
5
+ exit 1
6
+ fi
7
+
8
+ _pwd=$( pwd)
9
+ _lib=" $1 "
10
+
11
+ # todo: find a smarter fix
12
+ # Fixing "spawn sh ENOENT" issue
13
+ cd /
14
+
15
+ REQUIRED_DEPS=(" babel-cli" " babel-plugin-add-module-exports" " babel-preset-node6" );
16
+ NPM_BIN=` which npm`
17
+ NPM_GLOBAL_NM=` $NPM_BIN root -g`
18
+
19
+ echo " Checking babel-* dependencies in $NPM_GLOBAL_NM "
20
+
21
+ for DEP in ${REQUIRED_DEPS[@]} ; do
22
+ if [ ! -d " $NPM_GLOBAL_NM /$DEP " ]; then
23
+ echo " Installing missing $DEP "
24
+ " $NPM_BIN " install -g " $DEP " || (echo " Failed to install $DEP " && exit 1)
25
+ echo " $DEP has been installed"
26
+ echo " "
27
+ fi
28
+ done
29
+
30
+ cd " $_pwd " || (echo " Failed to resume to $_pwd " && exit 1)
31
+ cd " $_lib " || (echo " Failed to pwd to lib path $_pwd " && exit 1)
32
+ babel lib/ --extensions=' .js' --plugins=" $NPM_GLOBAL_NM /babel-plugin-add-module-exports" --presets=" $NPM_GLOBAL_NM /babel-preset-node6" --out-dir=" lib.es6" || (echo " Failed to compile $_pwd " && exit 1)
Original file line number Diff line number Diff line change 48
48
"url" : " https://github.com/MitocGroup/deepify.git"
49
49
},
50
50
"scripts" : {
51
- "postinstall" : " bash hooks/autocomplete_deepify.sh && bash hooks/install_templates.sh && bash hooks/ensure_es.sh && bash node-bin/assure-deps.sh" ,
52
- "test" : " bash node-bin/test.sh" ,
51
+ "compile-travis" : " bash ../../bin/compile-lib.sh ." ,
53
52
"compile" : " bash node-bin/compile.sh" ,
54
- "prepublish" : " bash node-bin/assure-deps.sh && bash node-bin/ compile.sh && node hooks/dump_comp.js "
53
+ "prepublish" : " npm run compile"
55
54
},
56
55
"dependencies" : {
57
56
"aws-sdk" : " ^2.39.x" ,
You can’t perform that action at this time.
0 commit comments