generator-reshow 0.17.21 → 0.17.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@ SWJS=${DIR}/service-worker.js
|
|
|
9
9
|
webpackEnabled=$(awk -F "=" '/^webpackEnabled/ {print $2}' $DIR/.yo)
|
|
10
10
|
|
|
11
11
|
conf='{'
|
|
12
|
-
conf+='"assetsRoot":"
|
|
12
|
+
conf+='"assetsRoot":"./assets/",'
|
|
13
13
|
conf+='"externals":{},'
|
|
14
14
|
conf+='"indexTpl":"'${DIR}/index.tpl'",'
|
|
15
15
|
conf+='"indexHtml":"'${DIR}/index.html'",'
|
|
@@ -27,14 +27,6 @@ if [ "x$webpackEnabled" == "xon" ]; then
|
|
|
27
27
|
webpack='npm run webpack --'
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
|
-
checkBabel() {
|
|
31
|
-
if [ ! -e ".babelrc" ] && [ ! -e "../../packages" ]; then
|
|
32
|
-
if [ -e ${DIR}/node_modules/reshow-app/.babelrc ]; then
|
|
33
|
-
cp ${DIR}/node_modules/reshow-app/.babelrc ${DIR}/.babelrc
|
|
34
|
-
fi
|
|
35
|
-
fi
|
|
36
|
-
}
|
|
37
|
-
|
|
38
30
|
killBy() {
|
|
39
31
|
ps -eo pid,args | grep $1 | grep -v grep | awk '{print $1}' | xargs -I{} kill -9 {}
|
|
40
32
|
}
|
|
@@ -74,7 +66,6 @@ startServer() {
|
|
|
74
66
|
production() {
|
|
75
67
|
stop
|
|
76
68
|
echo "Production Mode"
|
|
77
|
-
checkBabel
|
|
78
69
|
npm run build
|
|
79
70
|
if [ ! -z "$webpack" ]; then
|
|
80
71
|
ENABLE_SW=1 CONFIG=$conf NODE_ENV=production $webpack
|
|
@@ -84,7 +75,6 @@ production() {
|
|
|
84
75
|
analyzer() {
|
|
85
76
|
stop
|
|
86
77
|
echo "Analyzer Mode"
|
|
87
|
-
checkBabel
|
|
88
78
|
npm run build
|
|
89
79
|
[ ! -z "$webpack" ] && CONFIG=$conf BUNDLE='{}' $webpack
|
|
90
80
|
}
|
|
@@ -92,15 +82,12 @@ analyzer() {
|
|
|
92
82
|
develop() {
|
|
93
83
|
stop
|
|
94
84
|
echo "Develop Mode"
|
|
95
|
-
checkBabel
|
|
96
85
|
npm run build
|
|
97
86
|
[ ! -z "$webpack" ] && CONFIG=$conf $webpack
|
|
98
87
|
}
|
|
99
88
|
|
|
100
89
|
watch() {
|
|
101
|
-
stop
|
|
102
90
|
echo "Watch Mode"
|
|
103
|
-
checkBabel
|
|
104
91
|
npm run build:es:ui -- --watch &
|
|
105
92
|
npm run build:es:src -- --watch &
|
|
106
93
|
}
|
|
@@ -109,7 +96,6 @@ hot() {
|
|
|
109
96
|
stop
|
|
110
97
|
rm $SWJS
|
|
111
98
|
echo "Hot Mode"
|
|
112
|
-
checkBabel
|
|
113
99
|
npm run build:es:ui -- --watch &
|
|
114
100
|
npm run build:es:src -- --watch &
|
|
115
101
|
[ ! -z "$webpack" ] && sleep 10 && HOT_UPDATE=1 CONFIG=$conf $webpack serve &
|