File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ plugins=" company cookie.chrome cookie.firefox cpp.lint cpp.run github leetcode.cn lintcode solution.discuss"
4+
5+ for plugin in $plugins ; do
6+ echo " [$plugin ]"
7+ ./bin/leetcode ext -i $plugin
8+ done
9+
10+ ver=` node -v | sed ' s/^v//' | awk -F. ' {print $1}' `
11+ case ` uname` in
12+ Linux) os=linux ;;
13+ Darwin) os=macos ;;
14+ * ) echo " OS not supported!" && exit 1
15+ esac
16+ case ` uname -m` in
17+ x86_64) arch=x64 ;;
18+ i? 86) arch=x32 ;;
19+ * ) echo " Arch not supported!" && exit 1
20+ esac
21+
22+ rm -rf dist/*
23+ find node_modules -name " *.node" -exec cp {} dist/ \;
24+ npm run pkg -- node$ver -$os -$arch
25+ tar zcvf leetcode-cli.$os .tar.gz dist/
Original file line number Diff line number Diff line change 1212 "scripts" : {
1313 "lint" : " eslint lib/ test/" ,
1414 "test" : " npm run lint && nyc mocha test/** && nyc report --reporter=lcov" ,
15- "pkg" : " pkg . --out-path=dist/"
15+ "pkg" : " pkg . --out-path=dist/ --targets "
1616 },
1717 "pkg" : {
1818 "scripts" : [
You can’t perform that action at this time.
0 commit comments