@nx/react-native 18.0.0-beta.0 → 18.0.0-beta.2
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/.eslintrc.json +6 -1
- package/executors.json +5 -0
- package/generators.json +12 -11
- package/migrations.json +73 -1
- package/package.json +10 -15
- package/plugins/metro-resolver.js +4 -1
- package/plugins/plugin.d.ts +2 -0
- package/plugins/plugin.js +12 -1
- package/plugins/with-nx-metro.js +6 -2
- package/src/executors/build-android/build-android.impl.js +1 -5
- package/src/executors/build-android/build-android.impl.ts +1 -5
- package/src/executors/build-android/schema.json +1 -1
- package/src/executors/build-ios/schema.json +1 -1
- package/src/executors/bundle/schema.d.ts +1 -1
- package/src/executors/bundle/schema.json +1 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +4 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +4 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.ts +4 -0
- package/src/executors/ensure-symlink/schema.json +1 -1
- package/src/executors/pod-install/schema.json +1 -1
- package/src/executors/run-android/run-android.impl.js +4 -16
- package/src/executors/run-android/run-android.impl.ts +8 -17
- package/src/executors/run-android/schema.json +1 -1
- package/src/executors/run-ios/run-ios.impl.js +4 -16
- package/src/executors/run-ios/run-ios.impl.ts +9 -18
- package/src/executors/run-ios/schema.json +1 -1
- package/src/executors/start/schema.d.ts +1 -1
- package/src/executors/start/schema.json +1 -1
- package/src/executors/start/start.impl.js +11 -26
- package/src/executors/start/start.impl.ts +14 -28
- package/src/executors/storybook/storybook.impl.d.ts +4 -0
- package/src/executors/storybook/storybook.impl.js +8 -1
- package/src/executors/storybook/storybook.impl.ts +16 -5
- package/src/executors/sync-deps/schema.json +1 -1
- package/src/executors/sync-deps/sync-deps.impl.d.ts +3 -2
- package/src/executors/sync-deps/sync-deps.impl.js +28 -11
- package/src/executors/sync-deps/sync-deps.impl.ts +45 -19
- package/src/executors/upgrade/schema.d.ts +1 -0
- package/src/executors/upgrade/schema.json +11 -0
- package/src/executors/upgrade/upgrade.impl.d.ts +13 -0
- package/src/executors/upgrade/upgrade.impl.js +47 -0
- package/src/executors/upgrade/upgrade.impl.ts +64 -0
- package/src/generators/application/application.js +30 -7
- package/src/generators/application/application.spec.ts +29 -2
- package/src/generators/application/files/app/.babelrc.js.template +23 -0
- package/src/generators/application/files/app/android/app/build.gradle.template +12 -28
- package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +2 -6
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.kt.template +22 -0
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.kt.template +45 -0
- package/src/generators/application/files/app/android/build.gradle.template +7 -20
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/src/generators/application/files/app/android/gradle.properties +0 -3
- package/src/generators/application/files/app/android/gradlew.template +12 -7
- package/src/generators/application/files/app/android/settings.gradle.template +2 -2
- package/src/generators/application/files/app/ios/Podfile.template +0 -7
- package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +5 -0
- package/src/generators/application/files/app/ios/__className__/Info.plist.template +5 -8
- package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +11 -33
- package/src/generators/application/files/app/metro.config.js.template +0 -4
- package/src/generators/application/files/app/src/app/App.tsx.template +29 -2
- package/src/generators/application/lib/add-e2e.d.ts +3 -0
- package/src/generators/application/lib/add-e2e.js +47 -0
- package/src/generators/application/lib/add-project.js +13 -17
- package/src/generators/application/lib/normalize-options.d.ts +4 -0
- package/src/generators/application/lib/normalize-options.js +9 -3
- package/src/generators/application/lib/normalize-options.spec.ts +53 -5
- package/src/generators/application/schema.d.ts +5 -3
- package/src/generators/application/schema.json +14 -6
- package/src/generators/component/schema.d.ts +3 -3
- package/src/generators/component/schema.json +4 -4
- package/src/generators/component-story/component-story.d.ts +5 -8
- package/src/generators/component-story/component-story.js +8 -69
- package/src/generators/component-story/schema.d.ts +1 -0
- package/src/generators/component-story/schema.json +11 -3
- package/src/generators/init/init.d.ts +1 -0
- package/src/generators/init/init.js +14 -7
- package/src/generators/init/init.spec.ts +6 -2
- package/src/generators/init/schema.d.ts +1 -0
- package/src/generators/init/schema.json +1 -1
- package/src/generators/library/files/lib/.babelrc.js.template +21 -0
- package/src/generators/library/lib/normalize-options.js +1 -0
- package/src/generators/library/library.js +6 -1
- package/src/generators/library/library.spec.ts +12 -41
- package/src/generators/library/schema.d.ts +1 -0
- package/src/generators/library/schema.json +2 -2
- package/src/generators/stories/schema.d.ts +2 -0
- package/src/generators/stories/schema.json +15 -2
- package/src/generators/stories/stories.d.ts +5 -2
- package/src/generators/stories/stories.js +7 -50
- package/src/generators/storybook-configuration/configuration.d.ts +7 -2
- package/src/generators/storybook-configuration/configuration.js +15 -48
- package/src/generators/storybook-configuration/schema.d.ts +4 -2
- package/src/generators/storybook-configuration/schema.json +22 -12
- package/src/generators/upgrade-native/lib/normalize-options.d.ts +1 -1
- package/src/generators/upgrade-native/schema.d.ts +1 -1
- package/src/generators/upgrade-native/schema.json +3 -3
- package/src/generators/upgrade-native/upgrade-native.d.ts +2 -0
- package/src/generators/upgrade-native/upgrade-native.js +3 -0
- package/src/generators/web-configuration/files/base-vite/.babelrc.js.template +23 -0
- package/src/generators/web-configuration/files/base-vite/index.html__tmpl__ +15 -0
- package/src/generators/web-configuration/files/base-vite/public/favicon.ico +0 -0
- package/src/generators/web-configuration/files/base-vite/src/assets/.gitkeep +0 -0
- package/src/generators/web-configuration/files/base-vite/src/main-web.tsx__tmpl__ +9 -0
- package/src/generators/web-configuration/files/base-vite/vite.config.ts__tmpl__ +82 -0
- package/src/generators/web-configuration/files/base-webpack/.babelrc.js.template +23 -0
- package/src/generators/web-configuration/files/base-webpack/src/assets/.gitkeep +0 -0
- package/src/generators/web-configuration/files/base-webpack/src/favicon.ico +0 -0
- package/src/generators/web-configuration/files/base-webpack/src/index.html__tmpl__ +14 -0
- package/src/generators/web-configuration/files/base-webpack/src/main-web.tsx__tmpl__ +9 -0
- package/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ +77 -0
- package/src/generators/web-configuration/lib/normalize-schema.d.ts +17 -0
- package/src/generators/web-configuration/lib/normalize-schema.js +16 -0
- package/src/generators/web-configuration/lib/webpack-targets.d.ts +7 -0
- package/src/generators/web-configuration/lib/webpack-targets.js +75 -0
- package/src/generators/web-configuration/schema.d.ts +6 -0
- package/src/generators/web-configuration/schema.json +42 -0
- package/src/generators/web-configuration/web-configuration.d.ts +12 -0
- package/src/generators/web-configuration/web-configuration.js +85 -0
- package/src/migrations/update-16-6-0/update-metro-config.js +0 -4
- package/src/migrations/update-16-9-0/remove-types-react-native.js +2 -9
- package/src/migrations/update-18-0-0/add-upgrade-target.d.ts +6 -0
- package/src/migrations/update-18-0-0/add-upgrade-target.js +33 -0
- package/src/migrations/update-18-0-0/add-web-configuration.d.ts +8 -0
- package/src/migrations/update-18-0-0/add-web-configuration.js +33 -0
- package/src/migrations/update-18-0-0/add-web-configuration.spec.ts +39 -0
- package/src/migrations/update-18-0-0/change-storybook-targets.d.ts +5 -0
- package/src/migrations/update-18-0-0/change-storybook-targets.js +57 -0
- package/src/migrations/update-18-0-0/remove-block-list.d.ts +6 -0
- package/src/migrations/update-18-0-0/remove-block-list.js +26 -0
- package/src/migrations/update-18-0-0/remove-block-list.spec.ts +68 -0
- package/src/migrations/update-18-0-0/remove-metro.d.ts +14 -0
- package/src/migrations/update-18-0-0/remove-metro.js +29 -0
- package/src/migrations/update-18-0-0/remove-symlink-target.d.ts +6 -0
- package/src/migrations/update-18-0-0/remove-symlink-target.js +30 -0
- package/src/migrations/update-18-0-0/remove-symlink-target.spec.ts +40 -0
- package/src/utils/add-jest.d.ts +1 -1
- package/src/utils/add-jest.js +13 -1
- package/src/utils/add-linting.d.ts +1 -0
- package/src/utils/add-linting.js +1 -0
- package/src/utils/add-linting.spec.ts +2 -4
- package/src/utils/ensure-dependencies.js +2 -6
- package/src/utils/testing-generators.js +1 -0
- package/src/utils/versions.d.ts +9 -12
- package/src/utils/versions.js +10 -13
- package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -75
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +0 -32
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +0 -62
- package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -20
- package/src/generators/application/files/app/babel.config.json.template +0 -3
- package/src/generators/application/lib/add-detox.d.ts +0 -3
- package/src/generators/application/lib/add-detox.js +0 -23
- package/src/generators/component-story/component-story.spec.ts +0 -427
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -32
- package/src/generators/library/files/lib/babel.config.json.template +0 -17
- package/src/generators/stories/stories-app.spec.ts +0 -128
- package/src/generators/stories/stories-lib.spec.ts +0 -105
- package/src/generators/storybook-configuration/configuration.spec.ts +0 -135
- package/src/generators/storybook-configuration/files/app/storybook.ts.template +0 -9
- package/src/generators/storybook-configuration/files/app/toggle-storybook.tsx.template +0 -74
- package/src/generators/storybook-configuration/files/root/story-loader.ts.template +0 -5
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.d.ts +0 -6
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js +0 -25
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +0 -161
- package/src/generators/storybook-configuration/lib/create-storybook-files.d.ts +0 -6
- package/src/generators/storybook-configuration/lib/create-storybook-files.js +0 -42
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.d.ts +0 -7
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js +0 -29
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +0 -65
- package/src/utils/find-all-npm-dependencies.d.ts +0 -2
- package/src/utils/find-all-npm-dependencies.js +0 -25
- package/src/utils/find-all-npm-dependencies.spec.ts +0 -95
- package/src/utils/symlink-task.d.ts +0 -2
- package/src/utils/symlink-task.js +0 -18
|
@@ -7,25 +7,11 @@ const path_1 = require("path");
|
|
|
7
7
|
const is_packager_running_1 = require("./lib/is-packager-running");
|
|
8
8
|
async function* startExecutor(options, context) {
|
|
9
9
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
10
|
-
|
|
10
|
+
await runCliStart(context.root, projectRoot, options);
|
|
11
11
|
yield {
|
|
12
12
|
port: options.port,
|
|
13
13
|
success: true,
|
|
14
14
|
};
|
|
15
|
-
if (!startProcess) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
await new Promise((resolve) => {
|
|
19
|
-
const processExitListener = (signal) => () => {
|
|
20
|
-
startProcess.kill(signal);
|
|
21
|
-
resolve();
|
|
22
|
-
process.exit();
|
|
23
|
-
};
|
|
24
|
-
process.once('exit', (signal) => startProcess.kill(signal));
|
|
25
|
-
process.once('SIGTERM', processExitListener);
|
|
26
|
-
process.once('SIGINT', processExitListener);
|
|
27
|
-
process.once('SIGQUIT', processExitListener);
|
|
28
|
-
});
|
|
29
15
|
}
|
|
30
16
|
exports.default = startExecutor;
|
|
31
17
|
/*
|
|
@@ -47,7 +33,7 @@ async function runCliStart(workspaceRoot, projectRoot, options) {
|
|
|
47
33
|
return await startAsync(workspaceRoot, projectRoot, options);
|
|
48
34
|
}
|
|
49
35
|
catch (error) {
|
|
50
|
-
devkit_1.logger.error(`Failed to start the packager server. Error details: ${error.message}`);
|
|
36
|
+
devkit_1.logger.error(`Failed to start the packager server. Error details: ${error.message ?? error}`);
|
|
51
37
|
throw error;
|
|
52
38
|
}
|
|
53
39
|
}
|
|
@@ -58,16 +44,7 @@ function startAsync(workspaceRoot, projectRoot, options) {
|
|
|
58
44
|
const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), ['start', ...createStartOptions(options)], {
|
|
59
45
|
cwd: (0, path_1.resolve)(workspaceRoot, projectRoot),
|
|
60
46
|
env: process.env,
|
|
61
|
-
stdio:
|
|
62
|
-
});
|
|
63
|
-
childProcess.stdout.on('data', (data) => {
|
|
64
|
-
process.stdout.write(data);
|
|
65
|
-
if (data.toString().includes('reload the app')) {
|
|
66
|
-
resolve(childProcess);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
childProcess.stderr.on('data', (data) => {
|
|
70
|
-
process.stderr.write(data);
|
|
47
|
+
stdio: 'inherit',
|
|
71
48
|
});
|
|
72
49
|
childProcess.on('error', (err) => {
|
|
73
50
|
reject(err);
|
|
@@ -80,6 +57,14 @@ function startAsync(workspaceRoot, projectRoot, options) {
|
|
|
80
57
|
reject(code);
|
|
81
58
|
}
|
|
82
59
|
});
|
|
60
|
+
const processExitListener = (signal) => () => {
|
|
61
|
+
childProcess.kill(signal);
|
|
62
|
+
process.exit();
|
|
63
|
+
};
|
|
64
|
+
process.once('exit', (signal) => childProcess.kill(signal));
|
|
65
|
+
process.once('SIGTERM', processExitListener);
|
|
66
|
+
process.once('SIGINT', processExitListener);
|
|
67
|
+
process.once('SIGQUIT', processExitListener);
|
|
83
68
|
});
|
|
84
69
|
}
|
|
85
70
|
function createStartOptions(options) {
|
|
@@ -16,27 +16,12 @@ export default async function* startExecutor(
|
|
|
16
16
|
const projectRoot =
|
|
17
17
|
context.projectsConfigurations.projects[context.projectName].root;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
await runCliStart(context.root, projectRoot, options);
|
|
20
20
|
|
|
21
21
|
yield {
|
|
22
22
|
port: options.port,
|
|
23
23
|
success: true,
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
if (!startProcess) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
await new Promise<void>((resolve) => {
|
|
30
|
-
const processExitListener = (signal?: number | NodeJS.Signals) => () => {
|
|
31
|
-
startProcess.kill(signal);
|
|
32
|
-
resolve();
|
|
33
|
-
process.exit();
|
|
34
|
-
};
|
|
35
|
-
process.once('exit', (signal) => startProcess.kill(signal));
|
|
36
|
-
process.once('SIGTERM', processExitListener);
|
|
37
|
-
process.once('SIGINT', processExitListener);
|
|
38
|
-
process.once('SIGQUIT', processExitListener);
|
|
39
|
-
});
|
|
40
25
|
}
|
|
41
26
|
|
|
42
27
|
/*
|
|
@@ -61,7 +46,9 @@ export async function runCliStart(
|
|
|
61
46
|
return await startAsync(workspaceRoot, projectRoot, options);
|
|
62
47
|
} catch (error) {
|
|
63
48
|
logger.error(
|
|
64
|
-
`Failed to start the packager server. Error details: ${
|
|
49
|
+
`Failed to start the packager server. Error details: ${
|
|
50
|
+
error.message ?? error
|
|
51
|
+
}`
|
|
65
52
|
);
|
|
66
53
|
throw error;
|
|
67
54
|
}
|
|
@@ -80,20 +67,10 @@ function startAsync(
|
|
|
80
67
|
{
|
|
81
68
|
cwd: pathResolve(workspaceRoot, projectRoot),
|
|
82
69
|
env: process.env,
|
|
83
|
-
stdio:
|
|
70
|
+
stdio: 'inherit',
|
|
84
71
|
}
|
|
85
72
|
);
|
|
86
73
|
|
|
87
|
-
childProcess.stdout.on('data', (data) => {
|
|
88
|
-
process.stdout.write(data);
|
|
89
|
-
if (data.toString().includes('reload the app')) {
|
|
90
|
-
resolve(childProcess);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
childProcess.stderr.on('data', (data) => {
|
|
94
|
-
process.stderr.write(data);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
74
|
childProcess.on('error', (err) => {
|
|
98
75
|
reject(err);
|
|
99
76
|
});
|
|
@@ -104,6 +81,15 @@ function startAsync(
|
|
|
104
81
|
reject(code);
|
|
105
82
|
}
|
|
106
83
|
});
|
|
84
|
+
|
|
85
|
+
const processExitListener = (signal?: number | NodeJS.Signals) => () => {
|
|
86
|
+
childProcess.kill(signal);
|
|
87
|
+
process.exit();
|
|
88
|
+
};
|
|
89
|
+
process.once('exit', (signal) => childProcess.kill(signal));
|
|
90
|
+
process.once('SIGTERM', processExitListener);
|
|
91
|
+
process.once('SIGINT', processExitListener);
|
|
92
|
+
process.once('SIGQUIT', processExitListener);
|
|
107
93
|
});
|
|
108
94
|
}
|
|
109
95
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { ReactNativeStorybookOptions } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* TODO (@xiongemi): remove this function in v19.
|
|
5
|
+
* @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
|
|
6
|
+
*/
|
|
3
7
|
export default function reactNativeStorybookExecutor(options: ReactNativeStorybookOptions, context: ExecutorContext): AsyncGenerator<{
|
|
4
8
|
success: boolean;
|
|
5
9
|
}>;
|
|
@@ -8,13 +8,20 @@ const chalk = require("chalk");
|
|
|
8
8
|
const glob_1 = require("glob");
|
|
9
9
|
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
10
10
|
const fs_extra_1 = require("fs-extra");
|
|
11
|
+
/**
|
|
12
|
+
* TODO (@xiongemi): remove this function in v19.
|
|
13
|
+
* @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
|
|
14
|
+
*/
|
|
11
15
|
async function* reactNativeStorybookExecutor(options, context) {
|
|
12
16
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
17
|
devkit_1.logger.info(`${chalk.bold.cyan('info')} To see your Storybook stories on the device, you should start your mobile app for the <platform> of your choice (typically ios or android).`);
|
|
14
18
|
// add storybook addons to app's package.json
|
|
15
19
|
const packageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
|
|
20
|
+
const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
|
|
21
|
+
const workspacePackageJson = (0, devkit_1.readJsonFile)(workspacePackageJsonPath);
|
|
22
|
+
const projectPackageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
|
|
16
23
|
if ((0, fileutils_1.fileExists)(packageJsonPath))
|
|
17
|
-
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, await (0, sync_deps_impl_1.syncDeps)(
|
|
24
|
+
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, await (0, sync_deps_impl_1.syncDeps)(projectPackageJson, packageJsonPath, workspacePackageJson, [
|
|
18
25
|
`@storybook/react-native`,
|
|
19
26
|
'@storybook/addon-ondevice-actions',
|
|
20
27
|
'@storybook/addon-ondevice-backgrounds',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
-
import { ExecutorContext, logger } from '@nx/devkit';
|
|
2
|
+
import { ExecutorContext, logger, readJsonFile } from '@nx/devkit';
|
|
3
3
|
import { fileExists } from '@nx/workspace/src/utilities/fileutils';
|
|
4
4
|
import * as chalk from 'chalk';
|
|
5
5
|
import { sync as globSync } from 'glob';
|
|
@@ -10,7 +10,12 @@ import {
|
|
|
10
10
|
syncDeps,
|
|
11
11
|
} from '../sync-deps/sync-deps.impl';
|
|
12
12
|
import { writeFileSync } from 'fs-extra';
|
|
13
|
+
import { PackageJson } from 'nx/src/utils/package-json';
|
|
13
14
|
|
|
15
|
+
/**
|
|
16
|
+
* TODO (@xiongemi): remove this function in v19.
|
|
17
|
+
* @deprecated Going to use the default react storybook target. Use @nx/react:storybook executor instead.
|
|
18
|
+
*/
|
|
14
19
|
export default async function* reactNativeStorybookExecutor(
|
|
15
20
|
options: ReactNativeStorybookOptions,
|
|
16
21
|
context: ExecutorContext
|
|
@@ -25,14 +30,20 @@ export default async function* reactNativeStorybookExecutor(
|
|
|
25
30
|
|
|
26
31
|
// add storybook addons to app's package.json
|
|
27
32
|
const packageJsonPath = join(context.root, projectRoot, 'package.json');
|
|
33
|
+
const workspacePackageJsonPath = join(context.root, 'package.json');
|
|
34
|
+
|
|
35
|
+
const workspacePackageJson = readJsonFile<PackageJson>(
|
|
36
|
+
workspacePackageJsonPath
|
|
37
|
+
);
|
|
38
|
+
const projectPackageJson = readJsonFile<PackageJson>(packageJsonPath);
|
|
39
|
+
|
|
28
40
|
if (fileExists(packageJsonPath))
|
|
29
41
|
displayNewlyAddedDepsMessage(
|
|
30
42
|
context.projectName,
|
|
31
43
|
await syncDeps(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
context.projectGraph,
|
|
44
|
+
projectPackageJson,
|
|
45
|
+
packageJsonPath,
|
|
46
|
+
workspacePackageJson,
|
|
36
47
|
[
|
|
37
48
|
`@storybook/react-native`,
|
|
38
49
|
'@storybook/addon-ondevice-actions',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
4
|
"cli": "nx",
|
|
5
5
|
"$id": "NxReactNativeSyncDeps",
|
|
6
|
-
"$schema": "
|
|
6
|
+
"$schema": "https://json-schema.org/schema",
|
|
7
7
|
"title": "Sync Deps for React Native",
|
|
8
8
|
"description": "Updates `package.json` with project dependencies.",
|
|
9
9
|
"type": "object",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ExecutorContext
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { ReactNativeSyncDepsOptions } from './schema';
|
|
3
|
+
import { PackageJson } from 'nx/src/utils/package-json';
|
|
3
4
|
export interface ReactNativeSyncDepsOutput {
|
|
4
5
|
success: boolean;
|
|
5
6
|
}
|
|
6
7
|
export default function syncDepsExecutor(options: ReactNativeSyncDepsOptions, context: ExecutorContext): AsyncGenerator<ReactNativeSyncDepsOutput>;
|
|
7
|
-
export declare function syncDeps(
|
|
8
|
+
export declare function syncDeps(projectPackageJson: PackageJson, projectPackageJsonPath: string, workspacePackageJson: PackageJson, include?: string[], exclude?: string[]): Promise<string[]>;
|
|
8
9
|
export declare function displayNewlyAddedDepsMessage(projectName: string, deps: string[]): void;
|
|
@@ -4,10 +4,13 @@ exports.displayNewlyAddedDepsMessage = exports.syncDeps = void 0;
|
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const chalk = require("chalk");
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const find_all_npm_dependencies_1 = require("../../utils/find-all-npm-dependencies");
|
|
8
7
|
async function* syncDepsExecutor(options, context) {
|
|
9
8
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
10
|
-
|
|
9
|
+
const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
|
|
10
|
+
const projectPackageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
|
|
11
|
+
const workspacePackageJson = (0, devkit_1.readJsonFile)(workspacePackageJsonPath);
|
|
12
|
+
const projectPackageJson = (0, devkit_1.readJsonFile)(projectPackageJsonPath);
|
|
13
|
+
displayNewlyAddedDepsMessage(context.projectName, await syncDeps(projectPackageJson, projectPackageJsonPath, workspacePackageJson, typeof options.include === 'string'
|
|
11
14
|
? options.include.split(',')
|
|
12
15
|
: options.include, typeof options.exclude === 'string'
|
|
13
16
|
? options.exclude.split(',')
|
|
@@ -15,14 +18,13 @@ async function* syncDepsExecutor(options, context) {
|
|
|
15
18
|
yield { success: true };
|
|
16
19
|
}
|
|
17
20
|
exports.default = syncDepsExecutor;
|
|
18
|
-
async function syncDeps(
|
|
19
|
-
let npmDeps = (
|
|
20
|
-
|
|
21
|
-
const packageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
|
|
21
|
+
async function syncDeps(projectPackageJson, projectPackageJsonPath, workspacePackageJson, include = [], exclude = []) {
|
|
22
|
+
let npmDeps = Object.keys(workspacePackageJson.dependencies || {});
|
|
23
|
+
let npmDevdeps = Object.keys(workspacePackageJson.devDependencies || {});
|
|
22
24
|
const newDeps = [];
|
|
23
25
|
let updated = false;
|
|
24
|
-
if (!
|
|
25
|
-
|
|
26
|
+
if (!projectPackageJson.dependencies) {
|
|
27
|
+
projectPackageJson.dependencies = {};
|
|
26
28
|
updated = true;
|
|
27
29
|
}
|
|
28
30
|
if (include && include.length) {
|
|
@@ -31,15 +33,30 @@ async function syncDeps(projectName, projectRoot, workspaceRoot, projectGraph, i
|
|
|
31
33
|
if (exclude && exclude.length) {
|
|
32
34
|
npmDeps = npmDeps.filter((dep) => !exclude.includes(dep));
|
|
33
35
|
}
|
|
36
|
+
if (!projectPackageJson.devDependencies) {
|
|
37
|
+
projectPackageJson.devDependencies = {};
|
|
38
|
+
}
|
|
39
|
+
if (!projectPackageJson.dependencies) {
|
|
40
|
+
projectPackageJson.dependencies = {};
|
|
41
|
+
}
|
|
34
42
|
npmDeps.forEach((dep) => {
|
|
35
|
-
if (!
|
|
36
|
-
|
|
43
|
+
if (!projectPackageJson.dependencies[dep] &&
|
|
44
|
+
!projectPackageJson.devDependencies[dep]) {
|
|
45
|
+
projectPackageJson.dependencies[dep] = '*';
|
|
46
|
+
newDeps.push(dep);
|
|
47
|
+
updated = true;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
npmDevdeps.forEach((dep) => {
|
|
51
|
+
if (!projectPackageJson.dependencies[dep] &&
|
|
52
|
+
!projectPackageJson.devDependencies[dep]) {
|
|
53
|
+
projectPackageJson.devDependencies[dep] = '*';
|
|
37
54
|
newDeps.push(dep);
|
|
38
55
|
updated = true;
|
|
39
56
|
}
|
|
40
57
|
});
|
|
41
58
|
if (updated) {
|
|
42
|
-
(0, devkit_1.writeJsonFile)(
|
|
59
|
+
(0, devkit_1.writeJsonFile)(projectPackageJsonPath, projectPackageJson);
|
|
43
60
|
}
|
|
44
61
|
return newDeps;
|
|
45
62
|
}
|
|
@@ -3,14 +3,12 @@ import * as chalk from 'chalk';
|
|
|
3
3
|
import {
|
|
4
4
|
ExecutorContext,
|
|
5
5
|
logger,
|
|
6
|
-
ProjectGraph,
|
|
7
6
|
readJsonFile,
|
|
8
7
|
writeJsonFile,
|
|
9
8
|
} from '@nx/devkit';
|
|
10
9
|
|
|
11
|
-
import { findAllNpmDependencies } from '../../utils/find-all-npm-dependencies';
|
|
12
|
-
|
|
13
10
|
import { ReactNativeSyncDepsOptions } from './schema';
|
|
11
|
+
import { PackageJson } from 'nx/src/utils/package-json';
|
|
14
12
|
|
|
15
13
|
export interface ReactNativeSyncDepsOutput {
|
|
16
14
|
success: boolean;
|
|
@@ -22,13 +20,22 @@ export default async function* syncDepsExecutor(
|
|
|
22
20
|
): AsyncGenerator<ReactNativeSyncDepsOutput> {
|
|
23
21
|
const projectRoot =
|
|
24
22
|
context.projectsConfigurations.projects[context.projectName].root;
|
|
23
|
+
|
|
24
|
+
const workspacePackageJsonPath = join(context.root, 'package.json');
|
|
25
|
+
const projectPackageJsonPath = join(
|
|
26
|
+
context.root,
|
|
27
|
+
projectRoot,
|
|
28
|
+
'package.json'
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const workspacePackageJson = readJsonFile(workspacePackageJsonPath);
|
|
32
|
+
const projectPackageJson = readJsonFile(projectPackageJsonPath);
|
|
25
33
|
displayNewlyAddedDepsMessage(
|
|
26
34
|
context.projectName,
|
|
27
35
|
await syncDeps(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
context.projectGraph,
|
|
36
|
+
projectPackageJson,
|
|
37
|
+
projectPackageJsonPath,
|
|
38
|
+
workspacePackageJson,
|
|
32
39
|
typeof options.include === 'string'
|
|
33
40
|
? options.include.split(',')
|
|
34
41
|
: options.include,
|
|
@@ -42,21 +49,20 @@ export default async function* syncDepsExecutor(
|
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
export async function syncDeps(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
projectGraph: ProjectGraph,
|
|
52
|
+
projectPackageJson: PackageJson,
|
|
53
|
+
projectPackageJsonPath: string,
|
|
54
|
+
workspacePackageJson: PackageJson,
|
|
49
55
|
include: string[] = [],
|
|
50
56
|
exclude: string[] = []
|
|
51
57
|
): Promise<string[]> {
|
|
52
|
-
let npmDeps =
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
let npmDeps = Object.keys(workspacePackageJson.dependencies || {});
|
|
59
|
+
let npmDevdeps = Object.keys(workspacePackageJson.devDependencies || {});
|
|
60
|
+
|
|
55
61
|
const newDeps = [];
|
|
56
62
|
let updated = false;
|
|
57
63
|
|
|
58
|
-
if (!
|
|
59
|
-
|
|
64
|
+
if (!projectPackageJson.dependencies) {
|
|
65
|
+
projectPackageJson.dependencies = {};
|
|
60
66
|
updated = true;
|
|
61
67
|
}
|
|
62
68
|
|
|
@@ -67,16 +73,36 @@ export async function syncDeps(
|
|
|
67
73
|
npmDeps = npmDeps.filter((dep) => !exclude.includes(dep));
|
|
68
74
|
}
|
|
69
75
|
|
|
76
|
+
if (!projectPackageJson.devDependencies) {
|
|
77
|
+
projectPackageJson.devDependencies = {};
|
|
78
|
+
}
|
|
79
|
+
if (!projectPackageJson.dependencies) {
|
|
80
|
+
projectPackageJson.dependencies = {};
|
|
81
|
+
}
|
|
82
|
+
|
|
70
83
|
npmDeps.forEach((dep) => {
|
|
71
|
-
if (
|
|
72
|
-
|
|
84
|
+
if (
|
|
85
|
+
!projectPackageJson.dependencies[dep] &&
|
|
86
|
+
!projectPackageJson.devDependencies[dep]
|
|
87
|
+
) {
|
|
88
|
+
projectPackageJson.dependencies[dep] = '*';
|
|
89
|
+
newDeps.push(dep);
|
|
90
|
+
updated = true;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
npmDevdeps.forEach((dep) => {
|
|
94
|
+
if (
|
|
95
|
+
!projectPackageJson.dependencies[dep] &&
|
|
96
|
+
!projectPackageJson.devDependencies[dep]
|
|
97
|
+
) {
|
|
98
|
+
projectPackageJson.devDependencies[dep] = '*';
|
|
73
99
|
newDeps.push(dep);
|
|
74
100
|
updated = true;
|
|
75
101
|
}
|
|
76
102
|
});
|
|
77
103
|
|
|
78
104
|
if (updated) {
|
|
79
|
-
writeJsonFile(
|
|
105
|
+
writeJsonFile(projectPackageJsonPath, projectPackageJson);
|
|
80
106
|
}
|
|
81
107
|
|
|
82
108
|
return newDeps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export interface UpgradeExecutorSchema {}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"$id": "NxReactNativeUpgrade",
|
|
6
|
+
"title": "React Native Upgrade Executor",
|
|
7
|
+
"description": "Upgrade React Native code for project.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {},
|
|
10
|
+
"required": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
3
|
+
import { ChildProcess } from 'child_process';
|
|
4
|
+
import { UpgradeExecutorSchema } from './schema';
|
|
5
|
+
export interface ReactNativeUpgradeOutput {
|
|
6
|
+
success: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* This executor is equivalent to `npx react-native upgrade`.
|
|
10
|
+
* https://github.com/react-native-community/cli/blob/main/packages/cli/src/commands/upgrade/upgrade.ts
|
|
11
|
+
*/
|
|
12
|
+
export default function upgradeExecutor(options: UpgradeExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeUpgradeOutput>;
|
|
13
|
+
export declare function runCliUpgrade(workspaceRoot: string, projectRoot: string): Promise<ChildProcess>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runCliUpgrade = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
/**
|
|
7
|
+
* This executor is equivalent to `npx react-native upgrade`.
|
|
8
|
+
* https://github.com/react-native-community/cli/blob/main/packages/cli/src/commands/upgrade/upgrade.ts
|
|
9
|
+
*/
|
|
10
|
+
async function* upgradeExecutor(options, context) {
|
|
11
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
|
+
await runCliUpgrade(context.root, projectRoot);
|
|
13
|
+
yield { success: true };
|
|
14
|
+
}
|
|
15
|
+
exports.default = upgradeExecutor;
|
|
16
|
+
function runCliUpgrade(workspaceRoot, projectRoot) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), ['upgrade'], {
|
|
19
|
+
stdio: 'inherit',
|
|
20
|
+
cwd: (0, path_1.resolve)(workspaceRoot, projectRoot),
|
|
21
|
+
env: process.env,
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Ensure the child process is killed when the parent exits
|
|
25
|
+
*/
|
|
26
|
+
const processExitListener = (signal) => () => {
|
|
27
|
+
childProcess.kill(signal);
|
|
28
|
+
process.exit();
|
|
29
|
+
};
|
|
30
|
+
process.once('exit', (signal) => childProcess.kill(signal));
|
|
31
|
+
process.once('SIGTERM', processExitListener);
|
|
32
|
+
process.once('SIGINT', processExitListener);
|
|
33
|
+
process.once('SIGQUIT', processExitListener);
|
|
34
|
+
childProcess.on('error', (err) => {
|
|
35
|
+
reject(err);
|
|
36
|
+
});
|
|
37
|
+
childProcess.on('exit', (code) => {
|
|
38
|
+
if (code === 0) {
|
|
39
|
+
resolve(childProcess);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
reject(code);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
exports.runCliUpgrade = runCliUpgrade;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { resolve as pathResolve } from 'path';
|
|
3
|
+
import { ChildProcess, fork } from 'child_process';
|
|
4
|
+
|
|
5
|
+
import { UpgradeExecutorSchema } from './schema';
|
|
6
|
+
|
|
7
|
+
export interface ReactNativeUpgradeOutput {
|
|
8
|
+
success: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This executor is equivalent to `npx react-native upgrade`.
|
|
13
|
+
* https://github.com/react-native-community/cli/blob/main/packages/cli/src/commands/upgrade/upgrade.ts
|
|
14
|
+
*/
|
|
15
|
+
export default async function* upgradeExecutor(
|
|
16
|
+
options: UpgradeExecutorSchema,
|
|
17
|
+
context: ExecutorContext
|
|
18
|
+
): AsyncGenerator<ReactNativeUpgradeOutput> {
|
|
19
|
+
const projectRoot =
|
|
20
|
+
context.projectsConfigurations.projects[context.projectName].root;
|
|
21
|
+
|
|
22
|
+
await runCliUpgrade(context.root, projectRoot);
|
|
23
|
+
yield { success: true };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function runCliUpgrade(
|
|
27
|
+
workspaceRoot: string,
|
|
28
|
+
projectRoot: string
|
|
29
|
+
): Promise<ChildProcess> {
|
|
30
|
+
return new Promise<ChildProcess>((resolve, reject) => {
|
|
31
|
+
const childProcess = fork(
|
|
32
|
+
require.resolve('react-native/cli.js'),
|
|
33
|
+
['upgrade'],
|
|
34
|
+
{
|
|
35
|
+
stdio: 'inherit',
|
|
36
|
+
cwd: pathResolve(workspaceRoot, projectRoot),
|
|
37
|
+
env: process.env,
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Ensure the child process is killed when the parent exits
|
|
43
|
+
*/
|
|
44
|
+
const processExitListener = (signal?: number | NodeJS.Signals) => () => {
|
|
45
|
+
childProcess.kill(signal);
|
|
46
|
+
process.exit();
|
|
47
|
+
};
|
|
48
|
+
process.once('exit', (signal) => childProcess.kill(signal));
|
|
49
|
+
process.once('SIGTERM', processExitListener);
|
|
50
|
+
process.once('SIGINT', processExitListener);
|
|
51
|
+
process.once('SIGQUIT', processExitListener);
|
|
52
|
+
|
|
53
|
+
childProcess.on('error', (err) => {
|
|
54
|
+
reject(err);
|
|
55
|
+
});
|
|
56
|
+
childProcess.on('exit', (code) => {
|
|
57
|
+
if (code === 0) {
|
|
58
|
+
resolve(childProcess);
|
|
59
|
+
} else {
|
|
60
|
+
reject(code);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -3,19 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.reactNativeApplicationGeneratorInternal = exports.reactNativeApplicationGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
-
const
|
|
6
|
+
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
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
10
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
11
|
+
const web_configuration_1 = require("../web-configuration/web-configuration");
|
|
11
12
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
12
13
|
const init_1 = require("../init/init");
|
|
13
14
|
const add_project_1 = require("./lib/add-project");
|
|
14
15
|
const create_application_files_1 = require("./lib/create-application-files");
|
|
15
|
-
const
|
|
16
|
+
const add_e2e_1 = require("./lib/add-e2e");
|
|
16
17
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
18
|
+
const sync_deps_impl_1 = require("../../executors/sync-deps/sync-deps.impl");
|
|
17
19
|
async function reactNativeApplicationGenerator(host, schema) {
|
|
18
20
|
return await reactNativeApplicationGeneratorInternal(host, {
|
|
21
|
+
addPlugin: false,
|
|
19
22
|
projectNameAndRootFormat: 'derived',
|
|
20
23
|
...schema,
|
|
21
24
|
});
|
|
@@ -44,21 +47,41 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
44
47
|
],
|
|
45
48
|
});
|
|
46
49
|
tasks.push(lintTask);
|
|
47
|
-
const jestTask = await (0, add_jest_1.addJest)(host, options.unitTestRunner, options.projectName, options.appProjectRoot, options.js, options.skipPackageJson);
|
|
50
|
+
const jestTask = await (0, add_jest_1.addJest)(host, options.unitTestRunner, options.projectName, options.appProjectRoot, options.js, options.skipPackageJson, options.addPlugin);
|
|
48
51
|
tasks.push(jestTask);
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
const webTask = await (0, web_configuration_1.webConfigurationGenerator)(host, {
|
|
53
|
+
...options,
|
|
54
|
+
project: options.name,
|
|
55
|
+
skipFormat: true,
|
|
56
|
+
});
|
|
57
|
+
tasks.push(webTask);
|
|
58
|
+
const e2eTask = await (0, add_e2e_1.addE2e)(host, options);
|
|
59
|
+
tasks.push(e2eTask);
|
|
53
60
|
const chmodTaskGradlewTask = (0, chmod_android_gradle_files_1.chmodAndroidGradlewFilesTask)((0, devkit_1.joinPathFragments)(host.root, options.androidProjectRoot));
|
|
54
61
|
tasks.push(chmodTaskGradlewTask);
|
|
55
62
|
const podInstallTask = (0, pod_install_task_1.runPodInstall)((0, devkit_1.joinPathFragments)(host.root, options.iosProjectRoot));
|
|
56
63
|
if (options.install) {
|
|
64
|
+
const workspacePackageJsonPath = (0, devkit_1.joinPathFragments)('package.json');
|
|
65
|
+
const projectPackageJsonPath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json');
|
|
66
|
+
const workspacePackageJson = (0, devkit_1.readJson)(host, workspacePackageJsonPath);
|
|
67
|
+
const projectPackageJson = (0, devkit_1.readJson)(host, projectPackageJsonPath);
|
|
68
|
+
await (0, sync_deps_impl_1.syncDeps)(projectPackageJson, projectPackageJsonPath, workspacePackageJson);
|
|
57
69
|
tasks.push(podInstallTask);
|
|
58
70
|
}
|
|
71
|
+
else {
|
|
72
|
+
devkit_1.output.log({
|
|
73
|
+
title: 'Skip `pod install`',
|
|
74
|
+
bodyLines: [
|
|
75
|
+
`run 'nx run ${options.name}:pod-install' to install native modules before running iOS app`,
|
|
76
|
+
],
|
|
77
|
+
});
|
|
78
|
+
}
|
|
59
79
|
if (!options.skipFormat) {
|
|
60
80
|
await (0, devkit_1.formatFiles)(host);
|
|
61
81
|
}
|
|
82
|
+
tasks.push(() => {
|
|
83
|
+
(0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
|
|
84
|
+
});
|
|
62
85
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
63
86
|
}
|
|
64
87
|
exports.reactNativeApplicationGeneratorInternal = reactNativeApplicationGeneratorInternal;
|