forked from jefrydco/vue-adaptive-loading
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·63 lines (54 loc) · 2.37 KB
/
build.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
#!/bin/bash
multipleBuildsPath="../functions/builds/"
individualBuildAllFiles="build/*"
rm -rf .functions
# for PROJECT in vue-movie-network-aware-loading
for PROJECT in cra-battery-considerate-loading \
cra-device-class-aware-code-splitting \
cra-memory-considerate-loading \
cra-memory-considerate-loading-sketchfab \
cra-network-aware-code-splitting \
cra-network-aware-loading \
cra-network-aware-only-if-cached-loading \
cra-network-aware-data-fetching \
cra-ua-aware-code-splitting \
react-movie-network-aware-loading \
react-shrine-network-aware-code-splitting \
node-dpr-aware-loading \
node-network-memory-considerate-loading \
node-memory-considerate-loading \
node-network-aware-loading \
react-ebay-network-aware-code-splitting \
cra-hardware-concurrency-considerate-code-splitting \
cra-hardware-concurrency-considerate-loading \
react-dixie-memory-considerate-loading \
vue-dixie-memory-considerate-loading \
react-lottie-network-aware-loading \
react-youtube-adaptive-loading \
microsite \
cna-memory-considerate-animation \
"react-twitter-save-data-loading(client-hint)" \
"react-twitter-save-data-loading(hook)" \
"vue-twitter-save-data-loading(component)"
do
echo "Start building ${PROJECT}..."
cd $PROJECT
rm -rf node_modules build
npm install
npm run build
mkdir -p "${multipleBuildsPath}${PROJECT}"
cp -r $individualBuildAllFiles "${multipleBuildsPath}${PROJECT}"
cd ..
echo "Done building ${PROJECT}."
done
multipleBuildsStaticPath="functions/builds/static/"
rootProject="microsite"
mkdir -p "${multipleBuildsStaticPath}"
cp -r ${rootProject}/public/static/* "${multipleBuildsStaticPath}"
for PROJECT_WITH_STATIC in cna-memory-considerate-animation \
node-network-aware-loading \
node-memory-considerate-loading
do
mkdir -p "${multipleBuildsStaticPath}${PROJECT_WITH_STATIC}"
cp -r ${PROJECT_WITH_STATIC}/public/static/* "${multipleBuildsStaticPath}${PROJECT_WITH_STATIC}"
done