@nx/react-native 0.0.0-pr-22179-271588f
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 +48 -0
- package/LICENSE +22 -0
- package/README.md +68 -0
- package/executors.json +59 -0
- package/generators.json +58 -0
- package/index.d.ts +5 -0
- package/index.js +13 -0
- package/migrations.json +632 -0
- package/package.json +57 -0
- package/plugin.d.ts +1 -0
- package/plugin.js +6 -0
- package/plugins/jest/svg-mock.d.ts +0 -0
- package/plugins/jest/svg-mock.js +3 -0
- package/plugins/metro-resolver.d.ts +1 -0
- package/plugins/metro-resolver.js +136 -0
- package/plugins/plugin.d.ts +14 -0
- package/plugins/plugin.js +162 -0
- package/plugins/with-nx-metro.d.ts +8 -0
- package/plugins/with-nx-metro.js +31 -0
- package/project.json +54 -0
- package/src/executors/build-android/build-android.impl.d.ts +6 -0
- package/src/executors/build-android/build-android.impl.js +48 -0
- package/src/executors/build-android/build-android.impl.ts +69 -0
- package/src/executors/build-android/schema.d.ts +14 -0
- package/src/executors/build-android/schema.json +81 -0
- package/src/executors/build-ios/build-ios.impl.d.ts +6 -0
- package/src/executors/build-ios/build-ios.impl.js +55 -0
- package/src/executors/build-ios/build-ios.impl.ts +77 -0
- package/src/executors/build-ios/schema.d.ts +17 -0
- package/src/executors/build-ios/schema.json +91 -0
- package/src/executors/bundle/bundle.impl.d.ts +6 -0
- package/src/executors/bundle/bundle.impl.js +56 -0
- package/src/executors/bundle/bundle.impl.ts +77 -0
- package/src/executors/bundle/schema.d.ts +16 -0
- package/src/executors/bundle/schema.json +92 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +9 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.ts +22 -0
- package/src/executors/ensure-symlink/schema.json +11 -0
- package/src/executors/pod-install/pod-install.impl.d.ts +6 -0
- package/src/executors/pod-install/pod-install.impl.js +11 -0
- package/src/executors/pod-install/pod-install.impl.ts +21 -0
- package/src/executors/pod-install/schema.d.ts +6 -0
- package/src/executors/pod-install/schema.json +33 -0
- package/src/executors/run-android/run-android.impl.d.ts +6 -0
- package/src/executors/run-android/run-android.impl.js +66 -0
- package/src/executors/run-android/run-android.impl.ts +94 -0
- package/src/executors/run-android/schema.d.ts +13 -0
- package/src/executors/run-android/schema.json +100 -0
- package/src/executors/run-ios/run-ios.impl.d.ts +6 -0
- package/src/executors/run-ios/run-ios.impl.js +65 -0
- package/src/executors/run-ios/run-ios.impl.ts +92 -0
- package/src/executors/run-ios/schema.d.ts +7 -0
- package/src/executors/run-ios/schema.json +96 -0
- package/src/executors/start/lib/is-packager-running.d.ts +1 -0
- package/src/executors/start/lib/is-packager-running.js +15 -0
- package/src/executors/start/schema.d.ts +7 -0
- package/src/executors/start/schema.json +28 -0
- package/src/executors/start/start.impl.d.ts +10 -0
- package/src/executors/start/start.impl.js +87 -0
- package/src/executors/start/start.impl.ts +111 -0
- package/src/executors/storybook/schema.d.ts +5 -0
- package/src/executors/storybook/schema.json +29 -0
- package/src/executors/storybook/storybook.impl.d.ts +10 -0
- package/src/executors/storybook/storybook.impl.js +51 -0
- package/src/executors/storybook/storybook.impl.ts +85 -0
- package/src/executors/sync-deps/schema.d.ts +5 -0
- package/src/executors/sync-deps/schema.json +33 -0
- package/src/executors/sync-deps/sync-deps.impl.d.ts +9 -0
- package/src/executors/sync-deps/sync-deps.impl.js +78 -0
- package/src/executors/sync-deps/sync-deps.impl.ts +140 -0
- 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.d.ts +5 -0
- package/src/generators/application/application.js +87 -0
- package/src/generators/application/application.spec.ts +258 -0
- package/src/generators/application/files/app/.babelrc.js.template +23 -0
- package/src/generators/application/files/app/Gemfile.template +7 -0
- package/src/generators/application/files/app/android/app/build.gradle.template +119 -0
- package/src/generators/application/files/app/android/app/debug.keystore +0 -0
- package/src/generators/application/files/app/android/app/proguard-rules.pro +10 -0
- package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +30 -0
- package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +10 -0
- package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +26 -0
- 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/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/src/generators/application/files/app/android/app/src/main/res/values/strings.xml.template +3 -0
- package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +9 -0
- package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +7 -0
- package/src/generators/application/files/app/android/build.gradle.template +21 -0
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/src/generators/application/files/app/android/gradle.properties +41 -0
- package/src/generators/application/files/app/android/gradlew.bat +92 -0
- package/src/generators/application/files/app/android/gradlew.template +249 -0
- package/src/generators/application/files/app/android/settings.gradle.template +4 -0
- package/src/generators/application/files/app/app.json.template +4 -0
- package/src/generators/application/files/app/ios/.xcode.env.template +12 -0
- package/src/generators/application/files/app/ios/Podfile.template +55 -0
- package/src/generators/application/files/app/ios/__className__/AppDelegate.h +6 -0
- package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +31 -0
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +6 -0
- package/src/generators/application/files/app/ios/__className__/Info.plist.template +52 -0
- package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +47 -0
- package/src/generators/application/files/app/ios/__className__/main.m +10 -0
- package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +684 -0
- package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +88 -0
- package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +10 -0
- package/src/generators/application/files/app/ios/__className__Tests/Info.plist +24 -0
- package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +66 -0
- package/src/generators/application/files/app/metro.config.js.template +31 -0
- package/src/generators/application/files/app/package.json.template +14 -0
- package/src/generators/application/files/app/src/app/App.spec.tsx.template +9 -0
- package/src/generators/application/files/app/src/app/App.tsx.template +731 -0
- package/src/generators/application/files/app/src/main.tsx.template +4 -0
- package/src/generators/application/files/app/test-setup.ts.template +1 -0
- package/src/generators/application/files/app/tsconfig.app.json.template +10 -0
- package/src/generators/application/files/app/tsconfig.json.template +19 -0
- package/src/generators/application/lib/add-e2e.d.ts +3 -0
- package/src/generators/application/lib/add-e2e.js +46 -0
- package/src/generators/application/lib/add-project.d.ts +3 -0
- package/src/generators/application/lib/add-project.js +91 -0
- package/src/generators/application/lib/create-application-files.d.ts +3 -0
- package/src/generators/application/lib/create-application-files.js +24 -0
- package/src/generators/application/lib/normalize-options.d.ts +17 -0
- package/src/generators/application/lib/normalize-options.js +47 -0
- package/src/generators/application/lib/normalize-options.spec.ts +196 -0
- package/src/generators/application/schema.d.ts +23 -0
- package/src/generators/application/schema.json +103 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +64 -0
- package/src/generators/component/component.spec.ts +127 -0
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +11 -0
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +32 -0
- package/src/generators/component/lib/add-import.d.ts +3 -0
- package/src/generators/component/lib/add-import.js +33 -0
- package/src/generators/component/lib/normalize-options.d.ts +10 -0
- package/src/generators/component/lib/normalize-options.js +50 -0
- package/src/generators/component/schema.d.ts +24 -0
- package/src/generators/component/schema.json +85 -0
- package/src/generators/component-story/component-story.d.ts +8 -0
- package/src/generators/component-story/component-story.js +15 -0
- package/src/generators/component-story/schema.d.ts +6 -0
- package/src/generators/component-story/schema.json +42 -0
- package/src/generators/init/init.d.ts +6 -0
- package/src/generators/init/init.js +78 -0
- package/src/generators/init/init.spec.ts +38 -0
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
- package/src/generators/init/lib/add-git-ignore-entry.js +24 -0
- package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
- package/src/generators/init/lib/gitignore-entries.js +74 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +35 -0
- package/src/generators/library/files/lib/.babelrc.js.template +21 -0
- package/src/generators/library/files/lib/README.md +7 -0
- package/src/generators/library/files/lib/package.json.template +4 -0
- package/src/generators/library/files/lib/src/index.ts.template +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +1 -0
- package/src/generators/library/files/lib/tsconfig.json.template +16 -0
- package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
- package/src/generators/library/lib/normalize-options.d.ts +12 -0
- package/src/generators/library/lib/normalize-options.js +33 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +154 -0
- package/src/generators/library/library.spec.ts +420 -0
- package/src/generators/library/schema.d.ts +25 -0
- package/src/generators/library/schema.json +107 -0
- package/src/generators/stories/schema.d.ts +7 -0
- package/src/generators/stories/schema.json +58 -0
- package/src/generators/stories/stories.d.ts +8 -0
- package/src/generators/stories/stories.js +13 -0
- package/src/generators/storybook-configuration/configuration.d.ts +9 -0
- package/src/generators/storybook-configuration/configuration.js +26 -0
- package/src/generators/storybook-configuration/schema.d.ts +13 -0
- package/src/generators/storybook-configuration/schema.json +79 -0
- package/src/generators/upgrade-native/lib/create-native-files.d.ts +3 -0
- package/src/generators/upgrade-native/lib/create-native-files.js +14 -0
- package/src/generators/upgrade-native/lib/normalize-options.d.ts +12 -0
- package/src/generators/upgrade-native/lib/normalize-options.js +27 -0
- package/src/generators/upgrade-native/schema.d.ts +9 -0
- package/src/generators/upgrade-native/schema.json +41 -0
- package/src/generators/upgrade-native/upgrade-native.d.ts +10 -0
- package/src/generators/upgrade-native/upgrade-native.js +31 -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 +87 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js +9 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +73 -0
- 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 +29 -0
- package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +36 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.spec.ts +37 -0
- package/src/migrations/update-16-1-0/upgrade-storybook-6-5.d.ts +6 -0
- package/src/migrations/update-16-1-0/upgrade-storybook-6-5.js +21 -0
- package/src/migrations/update-16-6-0/add-depends-on.d.ts +6 -0
- package/src/migrations/update-16-6-0/add-depends-on.js +63 -0
- package/src/migrations/update-16-6-0/update-metro-config.d.ts +6 -0
- package/src/migrations/update-16-6-0/update-metro-config.js +63 -0
- package/src/migrations/update-16-9-0/remove-types-react-native.d.ts +7 -0
- package/src/migrations/update-16-9-0/remove-types-react-native.js +13 -0
- 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 +28 -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 +2 -0
- package/src/utils/add-jest.js +48 -0
- package/src/utils/add-linting.d.ts +13 -0
- package/src/utils/add-linting.js +36 -0
- package/src/utils/add-linting.spec.ts +40 -0
- package/src/utils/chmod-android-gradle-files.d.ts +3 -0
- package/src/utils/chmod-android-gradle-files.js +27 -0
- package/src/utils/ensure-dependencies.d.ts +2 -0
- package/src/utils/ensure-dependencies.js +30 -0
- package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
- package/src/utils/ensure-node-modules-symlink.js +28 -0
- package/src/utils/ensure-node-modules-symlink.spec.ts +108 -0
- package/src/utils/find-all-npm-dependencies.d.ts +2 -0
- package/src/utils/find-all-npm-dependencies.js +27 -0
- package/src/utils/find-all-npm-dependencies.spec.ts +103 -0
- package/src/utils/format-file.d.ts +1 -0
- package/src/utils/format-file.js +16 -0
- package/src/utils/get-cli-options.d.ts +8 -0
- package/src/utils/get-cli-options.js +33 -0
- package/src/utils/pod-install-task.d.ts +18 -0
- package/src/utils/pod-install-task.js +73 -0
- package/src/utils/testing-generators.d.ts +3 -0
- package/src/utils/testing-generators.js +32 -0
- package/src/utils/versions.d.ts +17 -0
- package/src/utils/versions.js +20 -0
- package/typings/svg.d.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-native/extend-expect';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "<%= offsetFromRoot %>dist/out-tsc",
|
|
5
|
+
"types": ["node"]
|
|
6
|
+
},
|
|
7
|
+
"files": ["<%= offsetFromRoot %>node_modules/@nx/react-native/typings/svg.d.ts"],
|
|
8
|
+
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.spec.tsx", "test-setup.ts"],
|
|
9
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"]
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "<%= rootTsConfigPath %>",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowSyntheticDefaultImports": true,
|
|
5
|
+
"jsx": "react-native",
|
|
6
|
+
"lib": ["dom", "esnext"],
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"declaration": true
|
|
11
|
+
},
|
|
12
|
+
"files": [],
|
|
13
|
+
"include": [],
|
|
14
|
+
"references": [
|
|
15
|
+
{
|
|
16
|
+
"path": "./tsconfig.app.json"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addE2e = void 0;
|
|
4
|
+
const add_e2e_1 = require("@nx/react/src/generators/application/lib/add-e2e");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const versions_1 = require("../../../utils/versions");
|
|
7
|
+
async function addE2e(host, options) {
|
|
8
|
+
switch (options.e2eTestRunner) {
|
|
9
|
+
case 'cypress':
|
|
10
|
+
return (0, add_e2e_1.addE2e)(host, {
|
|
11
|
+
...options,
|
|
12
|
+
e2eTestRunner: 'cypress',
|
|
13
|
+
style: 'none',
|
|
14
|
+
styledModule: null,
|
|
15
|
+
hasStyles: false,
|
|
16
|
+
unitTestRunner: 'none',
|
|
17
|
+
});
|
|
18
|
+
case 'playwright':
|
|
19
|
+
return (0, add_e2e_1.addE2e)(host, {
|
|
20
|
+
...options,
|
|
21
|
+
e2eTestRunner: 'playwright',
|
|
22
|
+
style: 'none',
|
|
23
|
+
styledModule: null,
|
|
24
|
+
hasStyles: false,
|
|
25
|
+
unitTestRunner: 'none',
|
|
26
|
+
});
|
|
27
|
+
case 'detox':
|
|
28
|
+
const { detoxApplicationGenerator } = (0, devkit_1.ensurePackage)('@nx/detox', versions_1.nxVersion);
|
|
29
|
+
return detoxApplicationGenerator(host, {
|
|
30
|
+
...options,
|
|
31
|
+
e2eName: options.e2eProjectName,
|
|
32
|
+
e2eDirectory: options.e2eProjectRoot,
|
|
33
|
+
projectNameAndRootFormat: 'as-provided',
|
|
34
|
+
appProject: options.projectName,
|
|
35
|
+
appDisplayName: options.displayName,
|
|
36
|
+
appName: options.name,
|
|
37
|
+
framework: 'react-native',
|
|
38
|
+
setParserOptionsProject: options.setParserOptionsProject,
|
|
39
|
+
skipFormat: true,
|
|
40
|
+
});
|
|
41
|
+
case 'none':
|
|
42
|
+
default:
|
|
43
|
+
return () => { };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.addE2e = addE2e;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addProject = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function addProject(host, options) {
|
|
6
|
+
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
7
|
+
const hasPlugin = nxJson.plugins?.some((p) => typeof p === 'string'
|
|
8
|
+
? p === '@nx/react-native/plugin'
|
|
9
|
+
: p.plugin === '@nx/react-native/plugin');
|
|
10
|
+
const project = {
|
|
11
|
+
root: options.appProjectRoot,
|
|
12
|
+
sourceRoot: `${options.appProjectRoot}/src`,
|
|
13
|
+
projectType: 'application',
|
|
14
|
+
targets: hasPlugin ? {} : getTargets(options),
|
|
15
|
+
tags: options.parsedTags,
|
|
16
|
+
};
|
|
17
|
+
(0, devkit_1.addProjectConfiguration)(host, options.projectName, {
|
|
18
|
+
...project,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.addProject = addProject;
|
|
22
|
+
function getTargets(options) {
|
|
23
|
+
const architect = {};
|
|
24
|
+
architect.start = {
|
|
25
|
+
executor: '@nx/react-native:start',
|
|
26
|
+
dependsOn: [],
|
|
27
|
+
options: {
|
|
28
|
+
port: 8081,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
architect['run-ios'] = {
|
|
32
|
+
executor: '@nx/react-native:run-ios',
|
|
33
|
+
dependsOn: [],
|
|
34
|
+
options: {},
|
|
35
|
+
};
|
|
36
|
+
architect['bundle-ios'] = {
|
|
37
|
+
executor: '@nx/react-native:bundle',
|
|
38
|
+
dependsOn: [],
|
|
39
|
+
outputs: ['{options.bundleOutput}'],
|
|
40
|
+
options: {
|
|
41
|
+
entryFile: options.entryFile,
|
|
42
|
+
platform: 'ios',
|
|
43
|
+
bundleOutput: `dist/${options.appProjectRoot}/ios/main.jsbundle`,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
architect['run-android'] = {
|
|
47
|
+
executor: '@nx/react-native:run-android',
|
|
48
|
+
dependsOn: [],
|
|
49
|
+
options: {},
|
|
50
|
+
};
|
|
51
|
+
architect['build-android'] = {
|
|
52
|
+
executor: '@nx/react-native:build-android',
|
|
53
|
+
outputs: [
|
|
54
|
+
`{projectRoot}/android/app/build/outputs/bundle`,
|
|
55
|
+
`{projectRoot}/android/app/build/outputs/apk`,
|
|
56
|
+
],
|
|
57
|
+
dependsOn: [],
|
|
58
|
+
options: {},
|
|
59
|
+
};
|
|
60
|
+
architect['build-ios'] = {
|
|
61
|
+
executor: '@nx/react-native:build-ios',
|
|
62
|
+
outputs: ['{projectRoot}/ios/build/Build'],
|
|
63
|
+
dependsOn: [],
|
|
64
|
+
options: {},
|
|
65
|
+
};
|
|
66
|
+
architect['pod-install'] = {
|
|
67
|
+
executor: '@nx/react-native:pod-install',
|
|
68
|
+
dependsOn: ['sync-deps'],
|
|
69
|
+
outputs: ['{projectRoot}/ios/Pods', '{projectRoot}/ios/Podfile.lock'],
|
|
70
|
+
options: {},
|
|
71
|
+
};
|
|
72
|
+
architect.upgrade = {
|
|
73
|
+
executor: '@nx/react-native:upgrade',
|
|
74
|
+
options: {},
|
|
75
|
+
};
|
|
76
|
+
architect['bundle-android'] = {
|
|
77
|
+
executor: '@nx/react-native:bundle',
|
|
78
|
+
dependsOn: [],
|
|
79
|
+
outputs: ['{options.bundleOutput}'],
|
|
80
|
+
options: {
|
|
81
|
+
entryFile: options.entryFile,
|
|
82
|
+
platform: 'android',
|
|
83
|
+
bundleOutput: `dist/${options.appProjectRoot}/android/main.jsbundle`,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
architect['sync-deps'] = {
|
|
87
|
+
executor: '@nx/react-native:sync-deps',
|
|
88
|
+
options: {},
|
|
89
|
+
};
|
|
90
|
+
return architect;
|
|
91
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createApplicationFiles = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const js_1 = require("@nx/js");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
function createApplicationFiles(host, options) {
|
|
8
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.appProjectRoot, {
|
|
9
|
+
...options,
|
|
10
|
+
entryFileIos: 'src/main',
|
|
11
|
+
offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.appProjectRoot),
|
|
12
|
+
rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot),
|
|
13
|
+
});
|
|
14
|
+
if (options.unitTestRunner === 'none') {
|
|
15
|
+
host.delete((0, path_1.join)(options.appProjectRoot, `/src/app/App.spec.tsx`));
|
|
16
|
+
}
|
|
17
|
+
if (options.e2eTestRunner === 'none') {
|
|
18
|
+
host.delete((0, path_1.join)(options.androidProjectRoot, `/app/src/androidTest/java/com/${options.lowerCaseName}/DetoxTest.java`));
|
|
19
|
+
}
|
|
20
|
+
if (options.js) {
|
|
21
|
+
(0, devkit_1.toJS)(host);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.createApplicationFiles = createApplicationFiles;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { Schema } from '../schema';
|
|
3
|
+
export interface NormalizedSchema extends Schema {
|
|
4
|
+
className: string;
|
|
5
|
+
fileName: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
appProjectRoot: string;
|
|
8
|
+
lowerCaseName: string;
|
|
9
|
+
iosProjectRoot: string;
|
|
10
|
+
androidProjectRoot: string;
|
|
11
|
+
parsedTags: string[];
|
|
12
|
+
entryFile: string;
|
|
13
|
+
rootProject: boolean;
|
|
14
|
+
e2eProjectName: string;
|
|
15
|
+
e2eProjectRoot: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
|
+
async function normalizeOptions(host, options) {
|
|
7
|
+
const { projectName: appProjectName, names: projectNames, projectRoot: appProjectRoot, projectNameAndRootFormat, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
8
|
+
name: options.name,
|
|
9
|
+
projectType: 'application',
|
|
10
|
+
directory: options.directory,
|
|
11
|
+
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
12
|
+
callingGenerator: '@nx/react-native:application',
|
|
13
|
+
});
|
|
14
|
+
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
15
|
+
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
16
|
+
const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
17
|
+
nxJson.useInferencePlugins !== false;
|
|
18
|
+
options.addPlugin ??= addPluginDefault;
|
|
19
|
+
const { className, fileName } = (0, devkit_1.names)(options.name);
|
|
20
|
+
const iosProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'ios');
|
|
21
|
+
const androidProjectRoot = (0, devkit_1.joinPathFragments)(appProjectRoot, 'android');
|
|
22
|
+
const rootProject = appProjectRoot === '.';
|
|
23
|
+
const e2eProjectName = rootProject ? 'e2e' : `${fileName}-e2e`;
|
|
24
|
+
const e2eProjectRoot = rootProject ? 'e2e' : `${appProjectRoot}-e2e`;
|
|
25
|
+
const parsedTags = options.tags
|
|
26
|
+
? options.tags.split(',').map((s) => s.trim())
|
|
27
|
+
: [];
|
|
28
|
+
const entryFile = options.js ? 'src/main.js' : 'src/main.tsx';
|
|
29
|
+
return {
|
|
30
|
+
...options,
|
|
31
|
+
name: projectNames.projectSimpleName,
|
|
32
|
+
className,
|
|
33
|
+
fileName,
|
|
34
|
+
lowerCaseName: className.toLowerCase(),
|
|
35
|
+
displayName: options.displayName || className,
|
|
36
|
+
projectName: appProjectName,
|
|
37
|
+
appProjectRoot,
|
|
38
|
+
iosProjectRoot,
|
|
39
|
+
androidProjectRoot,
|
|
40
|
+
parsedTags,
|
|
41
|
+
entryFile,
|
|
42
|
+
rootProject,
|
|
43
|
+
e2eProjectName,
|
|
44
|
+
e2eProjectRoot,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
exports.normalizeOptions = normalizeOptions;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
|
3
|
+
import { Linter } from '@nx/eslint';
|
|
4
|
+
import { Schema } from '../schema';
|
|
5
|
+
import { normalizeOptions } from './normalize-options';
|
|
6
|
+
|
|
7
|
+
describe('Normalize Options', () => {
|
|
8
|
+
let appTree: Tree;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
appTree = createTreeWithEmptyWorkspace();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should normalize options with name in kebab case', async () => {
|
|
15
|
+
const schema: Schema = {
|
|
16
|
+
name: 'my-app',
|
|
17
|
+
linter: Linter.EsLint,
|
|
18
|
+
e2eTestRunner: 'none',
|
|
19
|
+
install: false,
|
|
20
|
+
projectNameAndRootFormat: 'as-provided',
|
|
21
|
+
unitTestRunner: 'none',
|
|
22
|
+
bundler: 'vite',
|
|
23
|
+
};
|
|
24
|
+
const options = await normalizeOptions(appTree, schema);
|
|
25
|
+
expect(options).toEqual({
|
|
26
|
+
addPlugin: true,
|
|
27
|
+
androidProjectRoot: 'my-app/android',
|
|
28
|
+
appProjectRoot: 'my-app',
|
|
29
|
+
fileName: 'my-app',
|
|
30
|
+
className: 'MyApp',
|
|
31
|
+
displayName: 'MyApp',
|
|
32
|
+
iosProjectRoot: 'my-app/ios',
|
|
33
|
+
lowerCaseName: 'myapp',
|
|
34
|
+
name: 'my-app',
|
|
35
|
+
parsedTags: [],
|
|
36
|
+
projectName: 'my-app',
|
|
37
|
+
projectNameAndRootFormat: 'as-provided',
|
|
38
|
+
linter: Linter.EsLint,
|
|
39
|
+
entryFile: 'src/main.tsx',
|
|
40
|
+
e2eTestRunner: 'none',
|
|
41
|
+
unitTestRunner: 'none',
|
|
42
|
+
install: false,
|
|
43
|
+
bundler: 'vite',
|
|
44
|
+
rootProject: false,
|
|
45
|
+
e2eProjectName: 'my-app-e2e',
|
|
46
|
+
e2eProjectRoot: 'my-app-e2e',
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('should normalize options with name in camel case', async () => {
|
|
51
|
+
const schema: Schema = {
|
|
52
|
+
name: 'myApp',
|
|
53
|
+
e2eTestRunner: 'none',
|
|
54
|
+
install: false,
|
|
55
|
+
projectNameAndRootFormat: 'as-provided',
|
|
56
|
+
linter: Linter.None,
|
|
57
|
+
unitTestRunner: 'none',
|
|
58
|
+
bundler: 'vite',
|
|
59
|
+
};
|
|
60
|
+
const options = await normalizeOptions(appTree, schema);
|
|
61
|
+
expect(options).toEqual({
|
|
62
|
+
addPlugin: true,
|
|
63
|
+
androidProjectRoot: 'myApp/android',
|
|
64
|
+
appProjectRoot: 'myApp',
|
|
65
|
+
className: 'MyApp',
|
|
66
|
+
fileName: 'my-app',
|
|
67
|
+
displayName: 'MyApp',
|
|
68
|
+
iosProjectRoot: 'myApp/ios',
|
|
69
|
+
lowerCaseName: 'myapp',
|
|
70
|
+
name: 'myApp',
|
|
71
|
+
parsedTags: [],
|
|
72
|
+
projectName: 'myApp',
|
|
73
|
+
projectNameAndRootFormat: 'as-provided',
|
|
74
|
+
entryFile: 'src/main.tsx',
|
|
75
|
+
e2eTestRunner: 'none',
|
|
76
|
+
unitTestRunner: 'none',
|
|
77
|
+
install: false,
|
|
78
|
+
bundler: 'vite',
|
|
79
|
+
linter: Linter.None,
|
|
80
|
+
rootProject: false,
|
|
81
|
+
e2eProjectName: 'my-app-e2e',
|
|
82
|
+
e2eProjectRoot: 'myApp-e2e',
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('should normalize options with directory', async () => {
|
|
87
|
+
const schema: Schema = {
|
|
88
|
+
name: 'my-app',
|
|
89
|
+
directory: 'directory/my-app',
|
|
90
|
+
e2eTestRunner: 'none',
|
|
91
|
+
install: false,
|
|
92
|
+
projectNameAndRootFormat: 'as-provided',
|
|
93
|
+
linter: Linter.None,
|
|
94
|
+
unitTestRunner: 'none',
|
|
95
|
+
bundler: 'vite',
|
|
96
|
+
};
|
|
97
|
+
const options = await normalizeOptions(appTree, schema);
|
|
98
|
+
expect(options).toEqual({
|
|
99
|
+
addPlugin: true,
|
|
100
|
+
androidProjectRoot: 'directory/my-app/android',
|
|
101
|
+
appProjectRoot: 'directory/my-app',
|
|
102
|
+
className: 'MyApp',
|
|
103
|
+
fileName: 'my-app',
|
|
104
|
+
displayName: 'MyApp',
|
|
105
|
+
iosProjectRoot: 'directory/my-app/ios',
|
|
106
|
+
lowerCaseName: 'myapp',
|
|
107
|
+
name: 'my-app',
|
|
108
|
+
directory: 'directory/my-app',
|
|
109
|
+
parsedTags: [],
|
|
110
|
+
projectName: 'my-app',
|
|
111
|
+
projectNameAndRootFormat: 'as-provided',
|
|
112
|
+
entryFile: 'src/main.tsx',
|
|
113
|
+
e2eTestRunner: 'none',
|
|
114
|
+
unitTestRunner: 'none',
|
|
115
|
+
install: false,
|
|
116
|
+
bundler: 'vite',
|
|
117
|
+
linter: Linter.None,
|
|
118
|
+
rootProject: false,
|
|
119
|
+
e2eProjectName: 'my-app-e2e',
|
|
120
|
+
e2eProjectRoot: 'directory/my-app-e2e',
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it('should normalize options that has directory in its name', async () => {
|
|
125
|
+
const schema: Schema = {
|
|
126
|
+
name: 'directory/my-app',
|
|
127
|
+
e2eTestRunner: 'none',
|
|
128
|
+
install: false,
|
|
129
|
+
projectNameAndRootFormat: 'as-provided',
|
|
130
|
+
linter: Linter.None,
|
|
131
|
+
unitTestRunner: 'none',
|
|
132
|
+
bundler: 'vite',
|
|
133
|
+
};
|
|
134
|
+
const options = await normalizeOptions(appTree, schema);
|
|
135
|
+
expect(options).toEqual({
|
|
136
|
+
addPlugin: true,
|
|
137
|
+
androidProjectRoot: 'directory/my-app/android',
|
|
138
|
+
appProjectRoot: 'directory/my-app',
|
|
139
|
+
className: 'DirectoryMyApp',
|
|
140
|
+
fileName: 'directory/my-app',
|
|
141
|
+
displayName: 'DirectoryMyApp',
|
|
142
|
+
iosProjectRoot: 'directory/my-app/ios',
|
|
143
|
+
lowerCaseName: 'directorymyapp',
|
|
144
|
+
name: 'my-app',
|
|
145
|
+
parsedTags: [],
|
|
146
|
+
projectName: 'my-app',
|
|
147
|
+
projectNameAndRootFormat: 'as-provided',
|
|
148
|
+
entryFile: 'src/main.tsx',
|
|
149
|
+
e2eTestRunner: 'none',
|
|
150
|
+
unitTestRunner: 'none',
|
|
151
|
+
install: false,
|
|
152
|
+
bundler: 'vite',
|
|
153
|
+
linter: Linter.None,
|
|
154
|
+
rootProject: false,
|
|
155
|
+
e2eProjectName: 'directory/my-app-e2e',
|
|
156
|
+
e2eProjectRoot: 'directory/my-app-e2e',
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('should normalize options with display name', async () => {
|
|
161
|
+
const schema: Schema = {
|
|
162
|
+
name: 'my-app',
|
|
163
|
+
displayName: 'My App',
|
|
164
|
+
e2eTestRunner: 'none',
|
|
165
|
+
install: false,
|
|
166
|
+
projectNameAndRootFormat: 'as-provided',
|
|
167
|
+
linter: Linter.None,
|
|
168
|
+
unitTestRunner: 'none',
|
|
169
|
+
bundler: 'vite',
|
|
170
|
+
};
|
|
171
|
+
const options = await normalizeOptions(appTree, schema);
|
|
172
|
+
expect(options).toEqual({
|
|
173
|
+
addPlugin: true,
|
|
174
|
+
androidProjectRoot: 'my-app/android',
|
|
175
|
+
appProjectRoot: 'my-app',
|
|
176
|
+
className: 'MyApp',
|
|
177
|
+
fileName: 'my-app',
|
|
178
|
+
displayName: 'My App',
|
|
179
|
+
iosProjectRoot: 'my-app/ios',
|
|
180
|
+
lowerCaseName: 'myapp',
|
|
181
|
+
name: 'my-app',
|
|
182
|
+
parsedTags: [],
|
|
183
|
+
projectName: 'my-app',
|
|
184
|
+
projectNameAndRootFormat: 'as-provided',
|
|
185
|
+
entryFile: 'src/main.tsx',
|
|
186
|
+
e2eTestRunner: 'none',
|
|
187
|
+
unitTestRunner: 'none',
|
|
188
|
+
install: false,
|
|
189
|
+
bundler: 'vite',
|
|
190
|
+
linter: Linter.None,
|
|
191
|
+
rootProject: false,
|
|
192
|
+
e2eProjectName: 'my-app-e2e',
|
|
193
|
+
e2eProjectRoot: 'my-app-e2e',
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
|
+
import type { Linter } from '@nx/eslint';
|
|
3
|
+
|
|
4
|
+
export interface Schema {
|
|
5
|
+
name: string;
|
|
6
|
+
displayName?: string;
|
|
7
|
+
style?: string;
|
|
8
|
+
skipFormat?: boolean;
|
|
9
|
+
directory?: string;
|
|
10
|
+
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
11
|
+
tags?: string;
|
|
12
|
+
unitTestRunner: 'jest' | 'none'; // default is jest
|
|
13
|
+
pascalCaseFiles?: boolean;
|
|
14
|
+
classComponent?: boolean;
|
|
15
|
+
js?: boolean;
|
|
16
|
+
linter: Linter;
|
|
17
|
+
setParserOptionsProject?: boolean;
|
|
18
|
+
e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is cypress
|
|
19
|
+
bundler: 'webpack' | 'vite'; // default is webpack
|
|
20
|
+
install: boolean; // default is true
|
|
21
|
+
skipPackageJson?: boolean; //default is false
|
|
22
|
+
addPlugin?: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"$id": "NxReactNativeApplication",
|
|
4
|
+
"$schema": "https://json-schema.org/schema",
|
|
5
|
+
"title": "Create a React Application for Nx",
|
|
6
|
+
"description": "Create a React Application for Nx.",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"command": "nx g @nx/react-native:app myapp --directory=nested",
|
|
10
|
+
"description": "Generate `apps/nested/myapp`"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"command": "nx g @nx/react-native:app myapp --classComponent",
|
|
14
|
+
"description": "Use class components instead of functional components"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": {
|
|
20
|
+
"description": "The name of the application.",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"$default": {
|
|
23
|
+
"$source": "argv",
|
|
24
|
+
"index": 0
|
|
25
|
+
},
|
|
26
|
+
"x-prompt": "What name would you like to use for the application?",
|
|
27
|
+
"pattern": "^[a-zA-Z][^:]*$"
|
|
28
|
+
},
|
|
29
|
+
"displayName": {
|
|
30
|
+
"description": "The display name to show in the application. Defaults to name.",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"directory": {
|
|
34
|
+
"description": "The directory of the new application.",
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"projectNameAndRootFormat": {
|
|
38
|
+
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": ["as-provided", "derived"]
|
|
41
|
+
},
|
|
42
|
+
"skipFormat": {
|
|
43
|
+
"description": "Skip formatting files",
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": false,
|
|
46
|
+
"x-priority": "internal"
|
|
47
|
+
},
|
|
48
|
+
"linter": {
|
|
49
|
+
"description": "The tool to use for running lint checks.",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["eslint", "none"],
|
|
52
|
+
"default": "eslint"
|
|
53
|
+
},
|
|
54
|
+
"unitTestRunner": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["jest", "none"],
|
|
57
|
+
"description": "Test runner to use for unit tests",
|
|
58
|
+
"default": "jest"
|
|
59
|
+
},
|
|
60
|
+
"tags": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Add tags to the application (used for linting).",
|
|
63
|
+
"alias": "t"
|
|
64
|
+
},
|
|
65
|
+
"js": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Generate JavaScript files rather than TypeScript files",
|
|
68
|
+
"default": false
|
|
69
|
+
},
|
|
70
|
+
"setParserOptionsProject": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
73
|
+
"default": false
|
|
74
|
+
},
|
|
75
|
+
"e2eTestRunner": {
|
|
76
|
+
"description": "Adds the specified e2e test runner.",
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": ["cypress", "playwright", "detox", "none"],
|
|
79
|
+
"default": "cypress"
|
|
80
|
+
},
|
|
81
|
+
"install": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"description": "Runs `pod install` for native modules before building iOS app.",
|
|
84
|
+
"x-prompt": "Run 'pod install' for native modules?",
|
|
85
|
+
"default": true
|
|
86
|
+
},
|
|
87
|
+
"skipPackageJson": {
|
|
88
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"default": false,
|
|
91
|
+
"x-priority": "internal"
|
|
92
|
+
},
|
|
93
|
+
"bundler": {
|
|
94
|
+
"description": "The bundler to use.",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"enum": ["vite", "webpack"],
|
|
97
|
+
"x-prompt": "Which bundler do you want to use to build the application?",
|
|
98
|
+
"default": "webpack",
|
|
99
|
+
"x-priority": "important"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": []
|
|
103
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Schema } from './schema';
|
|
2
|
+
import { Tree } from '@nx/devkit';
|
|
3
|
+
export declare function reactNativeComponentGenerator(host: Tree, schema: Schema): Promise<void>;
|
|
4
|
+
export declare function reactNativeComponentGeneratorInternal(host: Tree, schema: Schema): Promise<void>;
|
|
5
|
+
export default reactNativeComponentGenerator;
|