-
Notifications
You must be signed in to change notification settings - Fork 0
/
runfile.js
45 lines (39 loc) · 999 Bytes
/
runfile.js
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
const { run, help } = require('runjs');
function dev(clearCache = false) {
if(clearCache) {
run('exp start --lan --dev --no-minify --clear');
} else {
run('exp start --lan --dev --no-minify');
}
}
function publish(env) {
let channel = env;
if (!channel) {
channel = 'staging';
}
run(`exp publish --release-channel ${channel}`);
}
function android(env) {
let channel = env;
if (!channel) {
channel = 'staging';
}
run(`exp build:android --release-channel ${channel} --no-publish`);
}
function ios(env) {
let channel = env;
if (!channel) {
channel = 'default';
}
run(`exp build:ios --release-channel ${channel} --no-publish -c `);
}
help(dev, 'Starts expo server for hosting application code');
help(publish, 'Publishes application code on expo servers. (Something like code push)');
help(android, 'Builds standalone apk for given env');
help(ios, 'Builds standalone apk for given env');
module.exports = {
dev,
publish,
android,
ios,
};