@nrwl/react-native 15.9.0-beta.8 → 15.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/executors.json +20 -0
- package/migrations.json +19 -0
- package/package.json +9 -9
- package/src/executors/build-android/build-android.impl.d.ts +2 -2
- package/src/executors/build-android/build-android.impl.js +31 -21
- package/src/executors/build-android/build-android.impl.js.map +1 -1
- package/src/executors/build-android/build-android.impl.ts +55 -28
- package/src/executors/build-android/schema.d.ts +27 -1
- package/src/executors/build-android/schema.json +79 -3
- package/src/executors/build-ios/build-ios.impl.d.ts +6 -0
- package/src/executors/build-ios/build-ios.impl.js +77 -0
- package/src/executors/build-ios/build-ios.impl.js.map +1 -0
- package/src/executors/build-ios/build-ios.impl.ts +118 -0
- package/src/executors/build-ios/compat.d.ts +2 -0
- package/src/executors/build-ios/compat.js +6 -0
- package/src/executors/build-ios/compat.js.map +1 -0
- package/src/executors/build-ios/schema.d.ts +22 -0
- package/src/executors/build-ios/schema.json +106 -0
- package/src/executors/bundle/schema.json +19 -1
- package/src/executors/pod-install/compat.d.ts +2 -0
- package/src/executors/pod-install/compat.js +6 -0
- package/src/executors/pod-install/compat.js.map +1 -0
- package/src/executors/pod-install/pod-install.impl.d.ts +6 -0
- package/src/executors/pod-install/pod-install.impl.js +15 -0
- package/src/executors/pod-install/pod-install.impl.js.map +1 -0
- package/src/executors/pod-install/pod-install.impl.ts +21 -0
- package/src/executors/pod-install/schema.d.ts +3 -0
- package/src/executors/pod-install/schema.json +18 -0
- package/src/executors/run-android/run-android.impl.js +5 -28
- package/src/executors/run-android/run-android.impl.js.map +1 -1
- package/src/executors/run-android/run-android.impl.ts +10 -27
- package/src/executors/run-android/schema.d.ts +18 -11
- package/src/executors/run-android/schema.json +59 -24
- package/src/executors/run-ios/run-ios.impl.js +7 -20
- package/src/executors/run-ios/run-ios.impl.js.map +1 -1
- package/src/executors/run-ios/run-ios.impl.ts +18 -21
- package/src/executors/run-ios/schema.d.ts +11 -13
- package/src/executors/run-ios/schema.json +61 -32
- package/src/executors/start/schema.d.ts +2 -0
- package/src/generators/application/application.spec.ts +15 -2
- package/src/generators/application/lib/add-detox.js +1 -1
- package/src/generators/application/lib/add-detox.js.map +1 -1
- package/src/generators/application/lib/add-project.js +11 -0
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/init/init.js +1 -1
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/library/library.spec.ts +2 -2
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +1 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +1 -0
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +1 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +75 -71
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +1 -1
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +37 -37
- package/src/migrations/update-15-0-0/add-babel-inputs.js +2 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js.map +1 -1
- package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +5 -0
- package/src/migrations/update-15-9-1/add-build-ios-target.js +34 -0
- package/src/migrations/update-15-9-1/add-build-ios-target.js.map +1 -0
- package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +36 -0
- package/src/utils/add-jest.js +1 -0
- package/src/utils/add-jest.js.map +1 -1
- package/src/utils/get-cli-options.d.ts +8 -0
- package/src/utils/get-cli-options.js +31 -0
- package/src/utils/get-cli-options.js.map +1 -0
- package/src/utils/pod-install-task.d.ts +2 -2
- package/src/utils/pod-install-task.js +12 -3
- package/src/utils/pod-install-task.js.map +1 -1
- package/src/utils/symlink-task.d.ts +1 -1
- package/src/utils/symlink-task.js +2 -2
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +2 -2
|
@@ -9,8 +9,16 @@
|
|
|
9
9
|
"type": "object",
|
|
10
10
|
"presets": [
|
|
11
11
|
{
|
|
12
|
-
"name": "Run Android
|
|
13
|
-
"keys": ["
|
|
12
|
+
"name": "Run Android for the current device architecture",
|
|
13
|
+
"keys": ["activeArchOnly"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "Lists all available Android devices and simulators",
|
|
17
|
+
"keys": ["listDevices"]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Run Android without metro cache",
|
|
21
|
+
"keys": ["resetCache"]
|
|
14
22
|
}
|
|
15
23
|
],
|
|
16
24
|
"properties": {
|
|
@@ -19,7 +27,12 @@
|
|
|
19
27
|
"description": "Specify your app's build variant (e.g. `debug`, `release`).",
|
|
20
28
|
"default": "debug",
|
|
21
29
|
"examples": ["debug", "release"],
|
|
22
|
-
"x-
|
|
30
|
+
"x-deprecated": "Deprecated from @react-native-community/cli, use mode instead, e.g. mode=debug. Will be remove in Nx 17."
|
|
31
|
+
},
|
|
32
|
+
"jetifier": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"description": "Run Jetifier – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.",
|
|
35
|
+
"x-deprecated": "Deprecated from @react-native-community/cli. Will be remove in Nx 17."
|
|
23
36
|
},
|
|
24
37
|
"appId": {
|
|
25
38
|
"type": "string",
|
|
@@ -38,18 +51,25 @@
|
|
|
38
51
|
"type": "string",
|
|
39
52
|
"description": "Builds your app and starts it on a specific device/simulator with the given device id (listed by running `adb devices` on the command line)."
|
|
40
53
|
},
|
|
41
|
-
"
|
|
54
|
+
"listDevices": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Lists all available Android devices and simulators and let you choose one to run the app",
|
|
57
|
+
"default": false
|
|
58
|
+
},
|
|
59
|
+
"binaryPath": {
|
|
42
60
|
"type": "string",
|
|
43
|
-
"description": "
|
|
61
|
+
"description": "Path relative to project root where pre-built .apk binary lives."
|
|
44
62
|
},
|
|
45
|
-
"
|
|
46
|
-
"type": "
|
|
47
|
-
"description": "
|
|
48
|
-
"default":
|
|
63
|
+
"mode": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Specify your app's build variant",
|
|
66
|
+
"default": "debug",
|
|
67
|
+
"examples": ["debug", "release"],
|
|
68
|
+
"x-priority": "important"
|
|
49
69
|
},
|
|
50
|
-
"
|
|
70
|
+
"packager": {
|
|
51
71
|
"type": "boolean",
|
|
52
|
-
"description": "
|
|
72
|
+
"description": "Launch packager while building",
|
|
53
73
|
"default": true
|
|
54
74
|
},
|
|
55
75
|
"port": {
|
|
@@ -57,28 +77,43 @@
|
|
|
57
77
|
"description": "The port where the packager server is listening on.",
|
|
58
78
|
"default": 8081
|
|
59
79
|
},
|
|
60
|
-
"
|
|
61
|
-
"type": "
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
80
|
+
"tasks": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
|
|
86
|
+
"examples": [
|
|
87
|
+
"assembleDebug",
|
|
88
|
+
"assembleRelease",
|
|
89
|
+
"bundleDebug",
|
|
90
|
+
"bundleRelease",
|
|
91
|
+
"installDebug",
|
|
92
|
+
"installRelease"
|
|
93
|
+
]
|
|
68
94
|
},
|
|
69
|
-
"
|
|
95
|
+
"activeArchOnly": {
|
|
70
96
|
"type": "boolean",
|
|
71
|
-
"description": "
|
|
97
|
+
"description": "Build native libraries only for the current device architecture for debug builds.",
|
|
98
|
+
"examples": ["x86_64", "arm64-v8a"],
|
|
72
99
|
"default": false
|
|
73
100
|
},
|
|
101
|
+
"extraParams": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "Custom params passed to gradle build command"
|
|
104
|
+
},
|
|
74
105
|
"interactive": {
|
|
75
106
|
"type": "boolean",
|
|
76
|
-
"description": "
|
|
107
|
+
"description": "Explicitly select build type and flavour to use before running a build"
|
|
108
|
+
},
|
|
109
|
+
"sync": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
|
77
112
|
"default": true
|
|
78
113
|
},
|
|
79
|
-
"
|
|
114
|
+
"resetCache": {
|
|
80
115
|
"type": "boolean",
|
|
81
|
-
"description": "
|
|
116
|
+
"description": "Resets metro cache.",
|
|
82
117
|
"default": false
|
|
83
118
|
}
|
|
84
119
|
},
|
|
@@ -8,6 +8,7 @@ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-s
|
|
|
8
8
|
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
9
9
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
10
10
|
const start_impl_1 = require("../start/start.impl");
|
|
11
|
+
const get_cli_options_1 = require("../../utils/get-cli-options");
|
|
11
12
|
let childProcess;
|
|
12
13
|
function runIosExecutor(options, context) {
|
|
13
14
|
return tslib_1.__asyncGenerator(this, arguments, function* runIosExecutor_1() {
|
|
@@ -20,11 +21,11 @@ function runIosExecutor(options, context) {
|
|
|
20
21
|
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
|
|
21
22
|
}
|
|
22
23
|
if (options.install) {
|
|
23
|
-
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
|
|
24
|
+
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios'), options.buildFolder));
|
|
24
25
|
}
|
|
25
26
|
try {
|
|
26
27
|
const tasks = [runCliRunIOS(context.root, projectRoot, options)];
|
|
27
|
-
if (options.packager && options.
|
|
28
|
+
if (options.packager && options.mode !== 'Release') {
|
|
28
29
|
tasks.push((0, start_impl_1.runCliStart)(context.root, projectRoot, {
|
|
29
30
|
port: options.port,
|
|
30
31
|
resetCache: options.resetCache,
|
|
@@ -68,24 +69,10 @@ function runCliRunIOS(workspaceRoot, projectRoot, options) {
|
|
|
68
69
|
});
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
'packager',
|
|
75
|
-
'port',
|
|
76
|
-
'resetCache',
|
|
77
|
-
'interactive',
|
|
78
|
-
];
|
|
72
|
+
const nxOptions = ['sync', 'install', 'packager'];
|
|
73
|
+
const startOptions = ['port', 'resetCache'];
|
|
74
|
+
const deprecatedOptions = ['xcodeConfiguration'];
|
|
79
75
|
function createRunIOSOptions(options) {
|
|
80
|
-
return
|
|
81
|
-
const v = options[k];
|
|
82
|
-
if (k === 'xcodeConfiguration') {
|
|
83
|
-
acc.push('--configuration', v);
|
|
84
|
-
}
|
|
85
|
-
else if (v && !nxOrStartOptions.includes(k)) {
|
|
86
|
-
acc.push(`--${k}`, options[k]);
|
|
87
|
-
}
|
|
88
|
-
return acc;
|
|
89
|
-
}, []);
|
|
76
|
+
return (0, get_cli_options_1.getCliOptions)(options, [...nxOptions, ...startOptions, ...deprecatedOptions], ['buildFolder']);
|
|
90
77
|
}
|
|
91
78
|
//# sourceMappingURL=run-ios.impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-ios.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/run-ios/run-ios.impl.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,iDAAmD;AACnD,2BAA8B;AAE9B,yFAAmF;AACnF,gEAGqC;AACrC,mEAA0D;AAE1D,oDAAkD;
|
|
1
|
+
{"version":3,"file":"run-ios.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/run-ios/run-ios.impl.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,iDAAmD;AACnD,2BAA8B;AAE9B,yFAAmF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d;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAClD,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAC5C,MAAM,iBAAiB,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAEjD,SAAS,mBAAmB,CAAC,OAAiC;IAC5D,OAAO,IAAA,+BAAa,EAClB,OAAO,EACP,CAAC,GAAG,SAAS,EAAE,GAAG,YAAY,EAAE,GAAG,iBAAiB,CAAC,EACrD,CAAC,aAAa,CAAC,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
1
|
+
import { ExecutorContext, logger, names } from '@nrwl/devkit';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { ChildProcess, fork } from 'child_process';
|
|
4
4
|
import { platform } from 'os';
|
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
import { podInstall } from '../../utils/pod-install-task';
|
|
12
12
|
import { ReactNativeRunIosOptions } from './schema';
|
|
13
13
|
import { runCliStart } from '../start/start.impl';
|
|
14
|
+
import { getCliOptions } from '../../utils/get-cli-options';
|
|
15
|
+
import { rmdirSync } from 'fs-extra';
|
|
14
16
|
|
|
15
17
|
export interface ReactNativeRunIosOutput {
|
|
16
18
|
success: boolean;
|
|
@@ -39,13 +41,17 @@ export default async function* runIosExecutor(
|
|
|
39
41
|
)
|
|
40
42
|
);
|
|
41
43
|
}
|
|
44
|
+
|
|
42
45
|
if (options.install) {
|
|
43
|
-
await podInstall(
|
|
46
|
+
await podInstall(
|
|
47
|
+
join(context.root, projectRoot, 'ios'),
|
|
48
|
+
options.buildFolder
|
|
49
|
+
);
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
try {
|
|
47
53
|
const tasks = [runCliRunIOS(context.root, projectRoot, options)];
|
|
48
|
-
if (options.packager && options.
|
|
54
|
+
if (options.packager && options.mode !== 'Release') {
|
|
49
55
|
tasks.push(
|
|
50
56
|
runCliStart(context.root, projectRoot, {
|
|
51
57
|
port: options.port,
|
|
@@ -101,23 +107,14 @@ function runCliRunIOS(
|
|
|
101
107
|
});
|
|
102
108
|
}
|
|
103
109
|
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
'packager',
|
|
108
|
-
'port',
|
|
109
|
-
'resetCache',
|
|
110
|
-
'interactive',
|
|
111
|
-
];
|
|
110
|
+
const nxOptions = ['sync', 'install', 'packager'];
|
|
111
|
+
const startOptions = ['port', 'resetCache'];
|
|
112
|
+
const deprecatedOptions = ['xcodeConfiguration'];
|
|
112
113
|
|
|
113
|
-
function createRunIOSOptions(options) {
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
acc.push(`--${k}`, options[k]);
|
|
120
|
-
}
|
|
121
|
-
return acc;
|
|
122
|
-
}, []);
|
|
114
|
+
function createRunIOSOptions(options: ReactNativeRunIosOptions) {
|
|
115
|
+
return getCliOptions<ReactNativeRunIosOptions>(
|
|
116
|
+
options,
|
|
117
|
+
[...nxOptions, ...startOptions, ...deprecatedOptions],
|
|
118
|
+
['buildFolder']
|
|
119
|
+
);
|
|
123
120
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
resetCache: boolean; // default is false
|
|
13
|
-
interactive: boolean; // default is true
|
|
1
|
+
import { ReactNativeBuildIosOptions } from '../build-ios/schema';
|
|
2
|
+
import { ReactNativeStartOptions } from '../start/schema';
|
|
3
|
+
|
|
4
|
+
// part of options form https://github.com/react-native-community/cli/blob/main/packages/cli-platform-ios/src/commands/runIOS/index.ts
|
|
5
|
+
export interface ReactNativeRunIosOptions extends ReactNativeBuildIosOptions {
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated use mode instead, will be removed in nx 17.
|
|
8
|
+
*/
|
|
9
|
+
xcodeConfiguration?: string;
|
|
10
|
+
|
|
11
|
+
binaryPath?: string;
|
|
14
12
|
}
|
|
@@ -9,15 +9,20 @@
|
|
|
9
9
|
"type": "object",
|
|
10
10
|
"presets": [
|
|
11
11
|
{
|
|
12
|
-
"name": "Run iOS
|
|
13
|
-
"keys": [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
"name": "Run iOS on a simulator",
|
|
13
|
+
"keys": ["simulator"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "Run iOS on a device",
|
|
17
|
+
"keys": ["device"]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Run iOS on a device with udid",
|
|
21
|
+
"keys": ["udid"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Run `pod install` before building iOS app",
|
|
25
|
+
"keys": ["install"]
|
|
21
26
|
}
|
|
22
27
|
],
|
|
23
28
|
"properties": {
|
|
@@ -26,16 +31,11 @@
|
|
|
26
31
|
"description": "Explicitly set the Xcode configuration to use.",
|
|
27
32
|
"default": "Debug",
|
|
28
33
|
"examples": ["Debug", "Release"],
|
|
29
|
-
"x-
|
|
30
|
-
},
|
|
31
|
-
"scheme": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "Explicitly set the Xcode scheme to use."
|
|
34
|
+
"x-deprecated": "Use `mode` instead. Deprecated from @react-native-community/cli. Will be removed in Nx 17."
|
|
34
35
|
},
|
|
35
36
|
"simulator": {
|
|
36
37
|
"type": "string",
|
|
37
|
-
"description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version:
|
|
38
|
-
"default": "iPhone 14",
|
|
38
|
+
"description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\"",
|
|
39
39
|
"examples": [
|
|
40
40
|
"iPhone 14",
|
|
41
41
|
"iPhone 13",
|
|
@@ -45,34 +45,59 @@
|
|
|
45
45
|
],
|
|
46
46
|
"x-priority": "important"
|
|
47
47
|
},
|
|
48
|
-
"
|
|
48
|
+
"mode": {
|
|
49
49
|
"type": "string",
|
|
50
|
-
"description": "Explicitly set
|
|
50
|
+
"description": "Explicitly set the scheme configuration to use",
|
|
51
|
+
"default": "Debug",
|
|
52
|
+
"examples": ["Debug", "Release"],
|
|
51
53
|
"x-priority": "important"
|
|
52
54
|
},
|
|
53
|
-
"
|
|
54
|
-
"type": "
|
|
55
|
-
"description": "
|
|
56
|
-
"default": false
|
|
55
|
+
"schema": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "Explicitly set Xcode scheme to use"
|
|
57
58
|
},
|
|
58
|
-
"
|
|
59
|
+
"device": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Explicitly set device to use by name. The value is not required if you have a single device connected."
|
|
62
|
+
},
|
|
63
|
+
"udid": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Explicitly set device to use by udid"
|
|
66
|
+
},
|
|
67
|
+
"verbose": {
|
|
59
68
|
"type": "boolean",
|
|
60
|
-
"description": "
|
|
61
|
-
"default": true,
|
|
62
|
-
"x-priority": "internal"
|
|
69
|
+
"description": "Do not use xcbeautify or xcpretty even if installed"
|
|
63
70
|
},
|
|
64
71
|
"port": {
|
|
65
72
|
"type": "number",
|
|
66
73
|
"description": "The port where the packager server is listening on.",
|
|
67
74
|
"default": 8081
|
|
68
75
|
},
|
|
69
|
-
"
|
|
76
|
+
"xcconfig": {
|
|
70
77
|
"type": "string",
|
|
71
|
-
"description": "
|
|
78
|
+
"description": "Explicitly set xcconfig to use"
|
|
72
79
|
},
|
|
73
|
-
"
|
|
80
|
+
"buildFolder": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory.",
|
|
83
|
+
"buildFolder": "./build"
|
|
84
|
+
},
|
|
85
|
+
"interactive": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Explicitly select which scheme and configuration to use before running a build"
|
|
88
|
+
},
|
|
89
|
+
"extraParams": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Custom params that will be passed to xcodebuild command."
|
|
92
|
+
},
|
|
93
|
+
"install": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "Runs `pod install` for native modules before building iOS app.",
|
|
96
|
+
"default": false
|
|
97
|
+
},
|
|
98
|
+
"sync": {
|
|
74
99
|
"type": "boolean",
|
|
75
|
-
"description": "
|
|
100
|
+
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
|
76
101
|
"default": true
|
|
77
102
|
},
|
|
78
103
|
"resetCache": {
|
|
@@ -80,10 +105,14 @@
|
|
|
80
105
|
"description": "Resets metro cache.",
|
|
81
106
|
"default": false
|
|
82
107
|
},
|
|
83
|
-
"
|
|
108
|
+
"packager": {
|
|
84
109
|
"type": "boolean",
|
|
85
|
-
"description": "
|
|
110
|
+
"description": "Launch packager while building",
|
|
86
111
|
"default": true
|
|
112
|
+
},
|
|
113
|
+
"binaryPath": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Path relative to project root where pre-built .app binary lives."
|
|
87
116
|
}
|
|
88
117
|
},
|
|
89
118
|
"examplesFile": "../../../docs/run-ios-examples.md"
|
|
@@ -62,6 +62,19 @@ describe('app', () => {
|
|
|
62
62
|
expect(appTree.exists('apps/my-app/.eslintrc.json')).toBe(true);
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
+
it('should generate targets', async () => {
|
|
66
|
+
await reactNativeApplicationGenerator(appTree, {
|
|
67
|
+
name: 'myApp',
|
|
68
|
+
displayName: 'myApp',
|
|
69
|
+
linter: Linter.EsLint,
|
|
70
|
+
e2eTestRunner: 'none',
|
|
71
|
+
install: false,
|
|
72
|
+
});
|
|
73
|
+
const targets = readProjectConfiguration(appTree, 'my-app').targets;
|
|
74
|
+
console.log(targets.test);
|
|
75
|
+
expect(targets.test).toBeDefined();
|
|
76
|
+
});
|
|
77
|
+
|
|
65
78
|
it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
|
|
66
79
|
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
67
80
|
|
|
@@ -184,7 +197,7 @@ describe('app', () => {
|
|
|
184
197
|
|
|
185
198
|
describe('--skipPackageJson', () => {
|
|
186
199
|
it('should not add or update dependencies when true', async () => {
|
|
187
|
-
const packageJsonBefore = appTree
|
|
200
|
+
const packageJsonBefore = readJson(appTree, 'package.json');
|
|
188
201
|
|
|
189
202
|
await reactNativeApplicationGenerator(appTree, {
|
|
190
203
|
name: 'myApp',
|
|
@@ -195,7 +208,7 @@ describe('app', () => {
|
|
|
195
208
|
skipPackageJson: true,
|
|
196
209
|
});
|
|
197
210
|
|
|
198
|
-
expect(appTree
|
|
211
|
+
expect(readJson(appTree, 'package.json')).toEqual(packageJsonBefore);
|
|
199
212
|
});
|
|
200
213
|
});
|
|
201
214
|
});
|
|
@@ -9,7 +9,7 @@ function addDetox(host, options) {
|
|
|
9
9
|
if ((options === null || options === void 0 ? void 0 : options.e2eTestRunner) !== 'detox') {
|
|
10
10
|
return () => { };
|
|
11
11
|
}
|
|
12
|
-
return (0, detox_1.detoxApplicationGenerator)(host, Object.assign(Object.assign({}, options), { linter: linter_1.Linter.EsLint, e2eName: `${options.name}-e2e`, e2eDirectory: options.directory, appProject: options.projectName, appDisplayName: options.displayName, appName: options.name, framework: 'react-native' }));
|
|
12
|
+
return (0, detox_1.detoxApplicationGenerator)(host, Object.assign(Object.assign({}, options), { linter: linter_1.Linter.EsLint, e2eName: `${options.name}-e2e`, e2eDirectory: options.directory, appProject: options.projectName, appDisplayName: options.displayName, appName: options.name, framework: 'react-native', skipFormat: true }));
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
exports.addDetox = addDetox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-detox.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-detox.ts"],"names":[],"mappings":";;;;AAAA,uCAAwD;AAGxD,yCAAsC;AAEtC,SAAsB,QAAQ,CAAC,IAAU,EAAE,OAAyB;;QAClE,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,MAAK,OAAO,EAAE;YACtC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,OAAO,IAAA,iCAAyB,EAAC,IAAI,kCAChC,OAAO,KACV,MAAM,EAAE,eAAM,CAAC,MAAM,EACrB,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,MAAM,EAC9B,YAAY,EAAE,OAAO,CAAC,SAAS,EAC/B,UAAU,EAAE,OAAO,CAAC,WAAW,EAC/B,cAAc,EAAE,OAAO,CAAC,WAAW,EACnC,OAAO,EAAE,OAAO,CAAC,IAAI,EACrB,SAAS,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"add-detox.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-detox.ts"],"names":[],"mappings":";;;;AAAA,uCAAwD;AAGxD,yCAAsC;AAEtC,SAAsB,QAAQ,CAAC,IAAU,EAAE,OAAyB;;QAClE,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,MAAK,OAAO,EAAE;YACtC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,OAAO,IAAA,iCAAyB,EAAC,IAAI,kCAChC,OAAO,KACV,MAAM,EAAE,eAAM,CAAC,MAAM,EACrB,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,MAAM,EAC9B,YAAY,EAAE,OAAO,CAAC,SAAS,EAC/B,UAAU,EAAE,OAAO,CAAC,WAAW,EAC/B,cAAc,EAAE,OAAO,CAAC,WAAW,EACnC,OAAO,EAAE,OAAO,CAAC,IAAI,EACrB,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,IAAI,IAChB,CAAC;IACL,CAAC;CAAA;AAhBD,4BAgBC"}
|
|
@@ -33,6 +33,7 @@ function getTargets(options) {
|
|
|
33
33
|
};
|
|
34
34
|
architect['bundle-ios'] = {
|
|
35
35
|
executor: '@nrwl/react-native:bundle',
|
|
36
|
+
outputs: ['{options.bundleOutput}'],
|
|
36
37
|
options: {
|
|
37
38
|
entryFile: options.entryFile,
|
|
38
39
|
platform: 'ios',
|
|
@@ -51,8 +52,18 @@ function getTargets(options) {
|
|
|
51
52
|
],
|
|
52
53
|
options: {},
|
|
53
54
|
};
|
|
55
|
+
architect['build-ios'] = {
|
|
56
|
+
executor: '@nrwl/react-native:build-ios',
|
|
57
|
+
outputs: ['{projectRoot}/ios/build/Build'],
|
|
58
|
+
options: {},
|
|
59
|
+
};
|
|
60
|
+
architect['pod-install'] = {
|
|
61
|
+
executor: '@nrwl/react-native:pod-install',
|
|
62
|
+
options: {},
|
|
63
|
+
};
|
|
54
64
|
architect['bundle-android'] = {
|
|
55
65
|
executor: '@nrwl/react-native:bundle',
|
|
66
|
+
outputs: ['{options.bundleOutput}'],
|
|
56
67
|
options: {
|
|
57
68
|
entryFile: options.entryFile,
|
|
58
69
|
platform: 'android',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAGtB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,OAAO,CAAC,cAAc;QAC5B,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,MAAM;QAC3C,WAAW,EAAE,aAAa;QAC1B,OAAO,oBAAO,UAAU,CAAC,OAAO,CAAC,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C,cAAc,wBAAwB;SACrE;KACF,CAAC;IAEF,SAAS,CAAC,WAAW,CAAC,GAAG;QACvB,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,gBAAgB,CAAC,GAAG;QAC5B,QAAQ,EAAE,mCAAmC;QAC7C,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAGtB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,OAAO,CAAC,cAAc;QAC5B,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,MAAM;QAC3C,WAAW,EAAE,aAAa;QAC1B,OAAO,oBAAO,UAAU,CAAC,OAAO,CAAC,CAAE;QACnC,IAAI,EAAE,OAAO,CAAC,UAAU;KACzB,CAAC;IAEF,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,oBAC5C,OAAO,EACV,CAAC;AACL,CAAC;AAZD,gCAYC;AAED,SAAS,UAAU,CAAC,OAAyB;IAC3C,MAAM,SAAS,GAA2C,EAAE,CAAC;IAE7D,SAAS,CAAC,KAAK,GAAG;QAChB,QAAQ,EAAE,0BAA0B;QACpC,OAAO,EAAE;YACP,IAAI,EAAE,IAAI;SACX;KACF,CAAC;IAEF,SAAS,CAAC,KAAK,GAAG;QAChB,QAAQ,EAAE,iBAAiB;QAC3B,OAAO,EAAE;YACP,OAAO,EAAE,YAAY,OAAO,CAAC,IAAI,EAAE;SACpC;KACF,CAAC;IAEF,SAAS,CAAC,SAAS,CAAC,GAAG;QACrB,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,YAAY,CAA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7 @@ const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
|
|
|
13
13
|
function reactNativeInitGenerator(host, schema) {
|
|
14
14
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
15
|
(0, add_git_ignore_entry_1.addGitIgnoreEntry)(host);
|
|
16
|
-
(0, add_babel_inputs_1.addBabelInputs)(host);
|
|
16
|
+
yield (0, add_babel_inputs_1.addBabelInputs)(host);
|
|
17
17
|
const tasks = [];
|
|
18
18
|
tasks.push(yield (0, js_1.initGenerator)(host, Object.assign(Object.assign({}, schema), { skipFormat: true })));
|
|
19
19
|
if (!schema.skipPackageJson) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCASsB;AAGtB,0EAAqE;AACrE,qCAA+C;AAC/C,uCAAiD;AACjD,6DAAyE;AACzE,iCAA4D;AAE5D,mDAqB8B;AAE9B,qEAA+D;AAE/D,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QACxB,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCASsB;AAGtB,0EAAqE;AACrE,qCAA+C;AAC/C,uCAAiD;AACjD,6DAAyE;AACzE,iCAA4D;AAE5D,mDAqB8B;AAE9B,qEAA+D;AAE/D,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QACxB,MAAM,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,KAAK,CAAC,IAAI,CACR,MAAM,IAAA,kBAAe,EAAC,IAAI,kCACrB,M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iB,EACjC,qBAAqB,EAAE,kCAAuB,EAC9C,6BAA6B,EAAE,kCAAuB,EACtD,8CAA8C,EAC5C,yCAA8B,EAChC,0CAA0C,EAAE,qCAA0B,EACtE,+BAA+B,EAAE,2CAAgC,EACjE,8BAA8B,EAAE,0CAA+B,EAC/D,mBAAmB,EAAE,iCAAsB,EAC3C,KAAK,EAAE,uBAAY,EACnB,gBAAgB,EAAE,uBAAY,EAC9B,sBAAsB,EAAE,uBAAY,EACpC,iCAAiC,EAAE,uBAAY,EAC/C,sCAAsC,EAAE,uBAAY,EACpD,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,EACzC,qBAAqB,EAAE,mCAAwB,EAC/C,2CAA2C,EACzC,qDAA0C,EAC5C,qBAAqB,EAAE,kCAAuB,IAC3C,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAzCD,gDAyCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
|
|
@@ -384,14 +384,14 @@ describe('lib', () => {
|
|
|
384
384
|
|
|
385
385
|
describe('--skipPackageJson', () => {
|
|
386
386
|
it('should not add or update dependencies when true', async () => {
|
|
387
|
-
const packageJsonBefore = appTree
|
|
387
|
+
const packageJsonBefore = readJson(appTree, 'package.json');
|
|
388
388
|
|
|
389
389
|
await libraryGenerator(appTree, {
|
|
390
390
|
...defaultSchema,
|
|
391
391
|
skipPackageJson: true,
|
|
392
392
|
});
|
|
393
393
|
|
|
394
|
-
expect(appTree
|
|
394
|
+
expect(readJson(appTree, 'package.json')).toEqual(packageJsonBefore);
|
|
395
395
|
});
|
|
396
396
|
});
|
|
397
397
|
});
|
|
@@ -58,7 +58,7 @@ describe('Add react-native-svg to dev dependencies', () => {
|
|
|
58
58
|
|
|
59
59
|
const jestConfig = tree.read('apps/products/jest.config.js', 'utf-8');
|
|
60
60
|
expect(jestConfig).toContain(
|
|
61
|
-
`moduleNameMapper: {'
|
|
61
|
+
`moduleNameMapper: { '.svg': '@nrwl/react-native/plugins/jest/svg-mock' },`
|
|
62
62
|
);
|
|
63
63
|
});
|
|
64
64
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-babel-config-root-13-5-0.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"add-babel-config-root-13-5-0.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.ts"],"names":[],"mappings":";;;AAAA,yCAA8D;AAC9D,0EAAqE;AAErE,SAA8B,MAAM,CAAC,IAAU;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;YACxE,OAAO;SACR;QAED,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;aAC9C,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC;aAC9B,IAAI,CACH,CAAC,OAAO,EAAE,EAAE,eACV,OAAA,CAAA,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,0BAA0B,CAAA,EAAA,CAClE,CAAC;QAEJ,IAAI,oBAAoB,EAAE;YACxB,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;SACtB;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAnBD,yBAmBC"}
|