-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.jetrc.js
65 lines (64 loc) · 1.74 KB
/
.jetrc.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const proc = require('node:child_process');
module.exports = {
config: {
// Global config overrides/defaults...
},
targets: {
// Use any key name to specify a new 'target' (--target=<key>)
// [key: string]: { ... }
macos: {
config: {
// Per target config overrides...
// These will override in order of:
// ...cliFlags
// ...globalConfig
// ...targetConfig
},
/**
* Use this to run builds, start the application etc.
*/
async before(config) {
const process = proc.spawnSync('npx', ['react-native', 'run-macos']);
if (process.error) {
console.log(process.stdout.toString());
console.log(process.stderr.toString());
throw new Error(`Failed to build macos. Error: ${process.error}`);
}
return config;
},
/**
* Use this for cleanup & teardown.
*/
async after(config) {
console.log('After');
},
},
ios: {
config: {
// Per target config overrides...
// These will override in order of:
// ...cliFlags
// ...globalConfig
// ...targetConfig
},
/**
* Use this to run builds, start the application etc.
*/
async before(config) {
const process = proc.spawnSync('npx', ['react-native', 'run-ios']);
if (process.error) {
console.log(process.stdout.toString());
console.log(process.stderr.toString());
throw new Error(`Failed to build ios. Error: ${process.error}`);
}
return config;
},
/**
* Use this for cleanup & teardown.
*/
async after(config) {
console.log('After');
},
},
},
};