forked from PatrickJS/angular-webpack-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.sh
More file actions
executable file
·104 lines (84 loc) · 1.59 KB
/
Copy pathapp.sh
File metadata and controls
executable file
·104 lines (84 loc) · 1.59 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/usr/bin/env bash
shopt -s expand_aliases
source ~/.bash_aliases
ADRHC_SSH_PORT=443
# cp -rv dist/* ~/apps/opt/apache-htdocs/a2ws/
deploy() {
local DEPLOY_REMOTE="$1"
if [ "$DEPLOY_REMOTE" == "deploy" ]; then
DEPLOY_REMOTE="$2"
fi
if [[ "$DEPLOY_REMOTE" == "remote" || "$DEPLOY_REMOTE" == "r" || "$DEPLOY_REMOTE" == "y" ]]; then
rsync -cEhikLmrt --progress --delete-after --delete-excluded dist/ -e "ssh -p $ADRHC_SSH_PORT" adr@adrhc.go.ro:/home/adr/apps/opt/apache-htdocs/a2ws
else
rsync -cEhikLmrt --progress --delete-after --delete-excluded dist/ ~/apps/opt/apache-htdocs/a2ws
fi
}
deployr() {
deploy "remote"
}
clean() {
local CLEAN_DLL="$1"
if [ "$CLEAN_DLL" == "clean" ]; then
CLEAN_DLL="$2"
fi
if [[ "$CLEAN_DLL" == "dll" || "$CLEAN_DLL" == "d" || "$CLEAN_DLL" == "y" ]]; then
npm run clean:dll
fi
npm run clean:aot
npm run clean:dist
}
dev() {
buildDev
}
buildDev() {
npm run build:dev
}
prod() {
buildProd
}
buildProd() {
npm run build:prod
}
aot() {
npm run build:aot:prod
}
aotDeploy() {
aot
deploy
}
aotDeployr() {
aot
deploy "remote"
}
prodDeploy() {
buildProd
deploy
}
gomAotDeploy() {
git pull origin master
aotDeploy
}
gomAotDeployr() {
gomAotDeploy "remote"
}
gomProdDeploy() {
git pull origin master
prodDeploy
}
start() {
npm start
}
cleanStart() {
local PARAMS="$1"
if [ "$PARAMS" == "cleanStart" ]; then
PARAMS="$2"
fi
clean "$PARAMS"
start
}
bashScripts() {
# search modules having webpack in peerDependencies
find node_modules/ -type f -name package.json -exec grep -A3 -nHr peerDependencies {} \; | grep -i "\"webpack\":"
}
$1 "$@"