-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinitialize
executable file
·48 lines (36 loc) · 1.08 KB
/
initialize
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
#!/bin/sh
if [ "$1" = "clean" ] ; then
echo "Cleaning..."
rm -rf cordova-app
rm -rf build
echo "Done!"
exit
fi
mkdir -p build
npx gulp build
npx cordova create cordova-app naikus.github.io.stagestarter StageStarter
# copy the existing config.xml (Note the app id and name in this file will take precedence over the
# cordova 'create' command above)
cp src/config.xml cordova-app
# copy the resources directory (splash screen, app icon, etc.)
cp -r src/res cordova-app/
cd cordova-app
rm -rf wwww && ln -s ../build www
npm install -D cordova
if [ "$1" = "ios" ] ; then
npm install -D ios-deploy
fi
if [ "$1" != "browser" ] ; then
npx cordova plugin add cordova-plugin-inappbrowser
npx cordova plugin add cordova-plugin-statusbar
# npx cordova plugin add cordova-plugin-dialogs
# npx cordova plugin add cordova-plugin-vibration
npx cordova plugin add cordova-plugin-network-information
npx cordova plugin add cordova-plugin-whitelist
fi
# add the appropriate platform
npx cordova platforms add $1
npx cordova prepare
# install local npm modules
cd ..
npm install