forked from DingZaiHub/wxappUnpacker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·65 lines (56 loc) · 1006 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
install_dependency()
{
echo "1. install dependency"
sudo npm install esprima -g
sudo npm install css-tree -g
sudo npm install cssbeautify -g
sudo npm install vm2 -g
sudo npm install uglify-es -g
sudo npm install js-beautify -g
sudo npm install escodegen -g
echo "2. npm list"
npm list esprima
npm list css-tree
npm list cssbeautify
npm list vm2
npm list uglify-es
npm list js-beautify
npm list escodegen
# echo "3. npm install"
# npm install
return 0;
}
install_npm()
{
echo "install node"
brew install node
echo "node versin is"
node -v
echo "npm versin is"
npm -v
echo "install n"
npm i -g n
echo "update to stable"
n stable
npm i npm
# npm i handlebars --reg=https://registry.npmjs.org
return 0;
}
check_menu()
{
menu=$1
args=$2
param=$3
if [ "-npm" == "$1" ]
then install_npm $args $param
elif [ "-dpc" == "$1" ]
then
install_dependency $args $param
else
install_dependency $1 $2
fi
return 0;
}
# 菜单
check_menu $1 $2 $3