5
5
// yarn examples
6
6
// cd examples/cordova1
7
7
// (plug in devices)
8
- // (ionic build if ionic 3)
9
8
// cordova run ios
10
9
// cordova run android
11
10
@@ -15,8 +14,6 @@ const DIR = "examples";
15
14
const TMP = "tmp" ;
16
15
const CORDOVA1 = "cordova1" ;
17
16
const PHONEGAP1 = "phonegap1" ;
18
- const IONIC1 = "ionic1" ;
19
- const IONIC3 = "ionic3" ;
20
17
21
18
// promisfy bash execution with stout streaming
22
19
const run = ( args , dir = undefined ) =>
@@ -78,58 +75,6 @@ const buildPhoneGap1 = async () => {
78
75
await run ( `phonegap platform add ios android` , `${ DIR } /${ PHONEGAP1 } ` ) ;
79
76
} ;
80
77
81
- const buildIonic1 = async ( ) => {
82
- await run ( `ionic start ${ IONIC1 } tabs --cordova --type ionic1` , `${ DIR } ` ) ;
83
- await run (
84
- `cp ./src/scripts/examples/templates/${ IONIC1 } /index.xml ./${ DIR } /${ IONIC1 } /config.xml`
85
- ) ;
86
- await run (
87
- `cp ./src/scripts/examples/templates/${ IONIC1 } /index.html ./${ DIR } /${ IONIC1 } /www/templates/tab-dash.html`
88
- ) ;
89
- await run (
90
- `cp ./src/scripts/examples/templates/${ IONIC1 } /app.js ./${ DIR } /${ IONIC1 } /www/js/app.js`
91
- ) ;
92
- await run (
93
- `cp ./src/scripts/examples/templates/${ IONIC1 } /controllers.js ./${ DIR } /${ IONIC1 } /www/js/controllers.js`
94
- ) ;
95
- await run ( `rm -rf ./${ DIR } /${ IONIC1 } /.git` ) ;
96
- await run ( `mkdir -p plugins/branch-cordova-sdk` , `${ DIR } /${ IONIC1 } ` ) ;
97
- await run (
98
- `rsync -a ../../${ TMP } / plugins/branch-cordova-sdk` ,
99
- `${ DIR } /${ IONIC1 } `
100
- ) ;
101
- await run ( `ionic cordova platform add ios` , `${ DIR } /${ IONIC1 } ` ) ;
102
- await run ( `ionic cordova platform add android` , `${ DIR } /${ IONIC1 } ` ) ;
103
- } ;
104
-
105
- const buildIonic3 = async ( ) => {
106
- await run ( `ionic start ${ IONIC3 } tabs --cordova` , `${ DIR } ` ) ;
107
- await run ( `mkdir -p plugins/branch-cordova-sdk` , `${ DIR } /${ IONIC3 } ` ) ;
108
- await run (
109
- `cp ./src/scripts/examples/templates/${ IONIC3 } /index.xml ./${ DIR } /${ IONIC3 } /config.xml`
110
- ) ;
111
- await run (
112
- `cp ./src/scripts/examples/templates/${ IONIC3 } /index.html ./${ DIR } /${ IONIC3 } /src/pages/home/home.html`
113
- ) ;
114
- await run (
115
- `cp ./src/scripts/examples/templates/${ IONIC3 } /app.js ./${ DIR } /${ IONIC3 } /src/app/app.component.ts`
116
- ) ;
117
- await run (
118
- `cp ./src/scripts/examples/templates/${ IONIC3 } /controllers.js ./${ DIR } /${ IONIC3 } /src/pages/home/home.ts`
119
- ) ;
120
- await run ( `rm -rf ./${ DIR } /${ IONIC3 } /.git` ) ;
121
- await run (
122
- `rsync -a ../../${ TMP } / plugins/branch-cordova-sdk` ,
123
- `${ DIR } /${ IONIC3 } `
124
- ) ;
125
- await run ( `ionic cordova platform add ios` , `${ DIR } /${ IONIC3 } ` ) ;
126
- await run ( `ionic cordova platform add android` , `${ DIR } /${ IONIC3 } ` ) ;
127
- } ;
128
-
129
- const installDependencies = async ( ) => {
130
- await run ( "yarn add -g cordova ionic phonegap" ) ;
131
- } ;
132
-
133
78
const copySdk = async ( ) => {
134
79
await run (
135
80
`rsync -a ./ ./${ TMP } --exclude node_modules --exclude .git --exclude ${ DIR } --exclude ${ TMP } `
@@ -142,12 +87,9 @@ const removeCopySdk = async () => {
142
87
143
88
const main = async ( ) => {
144
89
await cleanDirectory ( ) ;
145
- // await installDependencies();
146
90
await copySdk ( ) ;
147
91
await buildCordova1 ( ) ;
148
92
await buildPhoneGap1 ( ) ;
149
- await buildIonic1 ( ) ;
150
- await buildIonic3 ( ) ;
151
93
await removeCopySdk ( ) ;
152
94
} ;
153
95
0 commit comments