-
Notifications
You must be signed in to change notification settings - Fork 5
/
makeBundle
executable file
·78 lines (69 loc) · 1.53 KB
/
makeBundle
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
#!/bin/sh
# build dir
if [ $# -ge 3 ]
then
echo $1 $2 $3
if [ $3 == "noframework" ]
then
noframework="true"
fi
else
noframework="false"
fi
rm -rf $2
mkdir $2
cd $1
for file in *
do
if [ -d $file ]
then
# if [ $file == "JSPatch" ]
# then
# echo "copy JSPatch"
# cp -r $file ../$2
if [ $file == "Resources" ]
then
echo "copy resources"
cp -r $file ../$2
# elif [ $file == "Assets" ]
# then
# echo "not copy Assets"
# elif [ $file != "CommonModules" ]
# then
# echo "making bundle for page:"$file
# cd ..
# mkdir iOS
# react-native bundle --root $1/$file --entry-file $1/$file/index.ios.js --platform ios --bundle-output iOS/main.jsbundle --reset-cache --dev false --noframework $noframework --assets-dest $2
# str=` echo $file| tr '[A-Z]' '[a-z]' `
# mv iOS/main.jsbundle ./$str.jsbundle
# rm -rf iOS
# cd $1
fi
elif [ -f $file ]
then
cp $file ../$2
fi
done
# cd ..
# make main bundle
#mkdir iOS
#cp $1/Main/*.js ./
#react-native bundle
#mv iOS/main.jsbundle ./main.jsbundle
#rm -rf iOS
#rm *.js
# copy main bundle
# cp *.jsbundle $2
# rm *.jsbundle
# make setting bundle
#mkdir iOS
#cp $1/Setting/*.js ./
#react-native bundle
#mv iOS/main.jsbundle ./setting.jsbundle
#rm -rf iOS
#rm *.js
#copy setting bundle
#cp *.jsbundle $2
#rm *.jsbundle
#copy resources
#cp -r ./$1/Resources/* $2