File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 20
20
" package.json"
21
21
]
22
22
},
23
+ "scripts" : {
24
+ "clean" : " shx rm -rf dist" ,
25
+ "debug" : " npm run clean && shx cp -r lib dist && NODE_ENV=development BABEL_ENV=development babel dist --out-dir dist" ,
26
+ "dev" : " npm run clean && NODE_ENV=development BABEL_ENV=production rollup -c -w" ,
27
+ "build" : " npm run clean && NODE_ENV=production BABEL_ENV=production rollup -c" ,
28
+ "ppublish" : " bash ./ppublish.sh" ,
29
+ "prepare" : " npm run build"
30
+ },
23
31
"dependencies" : {
24
32
"fs-plus" : " 2.x" ,
25
33
"atom-space-pen-views" : " ^2.0.3"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " $OSTYPE "
4
+ if [[ " $OSTYPE " == ' msys' ]]; then
5
+ echo ' OS is Windows. Setting npm script-shell to bash'
6
+ if test -f ' C:/Program Files/git/bin/bash.exe' ; then
7
+ npm config set script-shell ' C:/Program Files/git/bin/bash.exe'
8
+ echo ' script-shell set to C:/Program Files/git/bin/bash.exe'
9
+ elif test -f ' C:/Program Files (x86)/git/bin/bash.exe' ; then
10
+ npm config set script-shell ' C:/Program Files (x86)/git/bin/bash.exe'
11
+ echo ' script-shell set to C:/Program Files (x86)/git/bin/bash.exe'
12
+ elif test -f ' C:/Windows/System32/bash.exe' ; then
13
+ npm config set script-shell ' C:/Windows/System32/bash.exe'
14
+ echo ' script-shell set to C:/Windows/System32/bash.exe'
15
+ else
16
+ error_exit ' git is not installed!'
17
+ fi
18
+ fi
19
+
20
+ if test -f ' .gitignore' ; then
21
+ git mv .gitignore .gitignore.back
22
+ npm run build
23
+ git add -- ./dist
24
+ git commit -m ' chore: add built files' -- ./dist
25
+ git mv .gitignore.back .gitignore
26
+ cd ./dist
27
+ git ls-files -z | xargs -0 git update-index --assume-unchanged
28
+ else
29
+ error_exit ' .gitignore does not exist!'
30
+ fi
You can’t perform that action at this time.
0 commit comments