@nx/react-native 17.3.0-beta.4 → 17.3.0-beta.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "17.3.0-beta.
|
|
3
|
+
"version": "17.3.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/detox": "17.3.0-beta.
|
|
40
|
-
"@nx/devkit": "17.3.0-beta.
|
|
41
|
-
"@nx/jest": "17.3.0-beta.
|
|
42
|
-
"@nx/js": "17.3.0-beta.
|
|
43
|
-
"@nx/eslint": "17.3.0-beta.
|
|
44
|
-
"@nx/react": "17.3.0-beta.
|
|
45
|
-
"@nx/workspace": "17.3.0-beta.
|
|
46
|
-
"@nrwl/react-native": "17.3.0-beta.
|
|
39
|
+
"@nx/detox": "17.3.0-beta.5",
|
|
40
|
+
"@nx/devkit": "17.3.0-beta.5",
|
|
41
|
+
"@nx/jest": "17.3.0-beta.5",
|
|
42
|
+
"@nx/js": "17.3.0-beta.5",
|
|
43
|
+
"@nx/eslint": "17.3.0-beta.5",
|
|
44
|
+
"@nx/react": "17.3.0-beta.5",
|
|
45
|
+
"@nx/workspace": "17.3.0-beta.5",
|
|
46
|
+
"@nrwl/react-native": "17.3.0-beta.5"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react-native": ">= 0.72.0 < 0.73.0"
|
package/plugins/plugin.d.ts
CHANGED
package/plugins/plugin.js
CHANGED
|
@@ -30,7 +30,6 @@ exports.createNodes = [
|
|
|
30
30
|
// Do not create a project if package.json or project.json or metro.config.js isn't there.
|
|
31
31
|
const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
|
|
32
32
|
if (!siblingFiles.includes('package.json') ||
|
|
33
|
-
!siblingFiles.includes('project.json') ||
|
|
34
33
|
!siblingFiles.includes('metro.config.js')) {
|
|
35
34
|
return {};
|
|
36
35
|
}
|
|
@@ -58,8 +57,17 @@ function buildReactNativeTargets(projectRoot, options, context) {
|
|
|
58
57
|
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
59
58
|
const targets = {
|
|
60
59
|
[options.startTargetName]: {
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
executor: `@nx/react-native:start`,
|
|
61
|
+
},
|
|
62
|
+
[options.podInstallTargetName]: {
|
|
63
|
+
command: `pod install`,
|
|
64
|
+
options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot, 'ios') },
|
|
65
|
+
cache: true,
|
|
66
|
+
inputs: getInputs(namedInputs),
|
|
67
|
+
outputs: [
|
|
68
|
+
getOutputs(projectRoot, 'ios/Pods'),
|
|
69
|
+
getOutputs(projectRoot, 'ios/Podfile.lock'),
|
|
70
|
+
],
|
|
63
71
|
},
|
|
64
72
|
[options.runIosTargetName]: {
|
|
65
73
|
command: `react-native run-ios`,
|
|
@@ -133,6 +141,7 @@ function load(path) {
|
|
|
133
141
|
function normalizeOptions(options) {
|
|
134
142
|
options ??= {};
|
|
135
143
|
options.startTargetName ??= 'start';
|
|
144
|
+
options.podInstallTargetName ??= 'pod-install';
|
|
136
145
|
options.runIosTargetName ??= 'run-ios';
|
|
137
146
|
options.runAndroidTargetName ??= 'run-android';
|
|
138
147
|
options.buildIosTargetName ??= 'build-ios';
|
|
@@ -7,6 +7,7 @@ const symlink_task_1 = require("../../utils/symlink-task");
|
|
|
7
7
|
const add_linting_1 = require("../../utils/add-linting");
|
|
8
8
|
const add_jest_1 = require("../../utils/add-jest");
|
|
9
9
|
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
10
|
+
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
10
11
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
11
12
|
const init_1 = require("../init/init");
|
|
12
13
|
const add_project_1 = require("./lib/add-project");
|
|
@@ -51,6 +52,10 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
51
52
|
tasks.push(symlinkTask);
|
|
52
53
|
const chmodTaskGradlewTask = (0, chmod_android_gradle_files_1.chmodAndroidGradlewFilesTask)((0, devkit_1.joinPathFragments)(host.root, options.androidProjectRoot));
|
|
53
54
|
tasks.push(chmodTaskGradlewTask);
|
|
55
|
+
const podInstallTask = (0, pod_install_task_1.runPodInstall)((0, devkit_1.joinPathFragments)(host.root, options.iosProjectRoot));
|
|
56
|
+
if (options.install) {
|
|
57
|
+
tasks.push(podInstallTask);
|
|
58
|
+
}
|
|
54
59
|
if (!options.skipFormat) {
|
|
55
60
|
await (0, devkit_1.formatFiles)(host);
|
|
56
61
|
}
|