@nrwl/react-native 16.0.0-beta.0 → 16.0.0-beta.1
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 +40 -40
- package/generators.json +2 -107
- package/index.d.ts +1 -5
- package/index.js +2 -11
- package/index.js.map +1 -1
- package/package.json +7 -25
- package/plugins/jest/svg-mock.js.map +1 -1
- package/plugins/with-nx-metro.d.ts +1 -8
- package/plugins/with-nx-metro.js +2 -29
- package/plugins/with-nx-metro.js.map +1 -1
- package/.eslintrc.json +0 -19
- package/README.md +0 -63
- package/migrations.json +0 -1285
- package/plugins/metro-resolver.d.ts +0 -1
- package/plugins/metro-resolver.js +0 -135
- package/plugins/metro-resolver.js.map +0 -1
- package/project.json +0 -61
- package/src/executors/build-android/build-android.impl.d.ts +0 -6
- package/src/executors/build-android/build-android.impl.js +0 -76
- package/src/executors/build-android/build-android.impl.js.map +0 -1
- package/src/executors/build-android/build-android.impl.ts +0 -108
- package/src/executors/build-android/compat.d.ts +0 -2
- package/src/executors/build-android/compat.js +0 -6
- package/src/executors/build-android/compat.js.map +0 -1
- package/src/executors/build-android/schema.d.ts +0 -31
- package/src/executors/build-android/schema.json +0 -102
- package/src/executors/build-ios/build-ios.impl.d.ts +0 -6
- package/src/executors/build-ios/build-ios.impl.js +0 -77
- package/src/executors/build-ios/build-ios.impl.js.map +0 -1
- package/src/executors/build-ios/build-ios.impl.ts +0 -118
- package/src/executors/build-ios/compat.d.ts +0 -2
- package/src/executors/build-ios/compat.js +0 -6
- package/src/executors/build-ios/compat.js.map +0 -1
- package/src/executors/build-ios/schema.d.ts +0 -22
- package/src/executors/build-ios/schema.json +0 -106
- package/src/executors/bundle/bundle.impl.d.ts +0 -6
- package/src/executors/bundle/bundle.impl.js +0 -58
- package/src/executors/bundle/bundle.impl.js.map +0 -1
- package/src/executors/bundle/bundle.impl.ts +0 -76
- package/src/executors/bundle/compat.d.ts +0 -2
- package/src/executors/bundle/compat.js +0 -6
- package/src/executors/bundle/compat.js.map +0 -1
- package/src/executors/bundle/schema.d.ts +0 -16
- package/src/executors/bundle/schema.json +0 -92
- package/src/executors/ensure-symlink/compat.d.ts +0 -2
- package/src/executors/ensure-symlink/compat.js +0 -6
- package/src/executors/ensure-symlink/compat.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +0 -5
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +0 -13
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.ts +0 -18
- package/src/executors/ensure-symlink/schema.json +0 -11
- package/src/executors/pod-install/compat.d.ts +0 -2
- package/src/executors/pod-install/compat.js +0 -6
- package/src/executors/pod-install/compat.js.map +0 -1
- package/src/executors/pod-install/pod-install.impl.d.ts +0 -6
- package/src/executors/pod-install/pod-install.impl.js +0 -15
- package/src/executors/pod-install/pod-install.impl.js.map +0 -1
- package/src/executors/pod-install/pod-install.impl.ts +0 -21
- package/src/executors/pod-install/schema.d.ts +0 -3
- package/src/executors/pod-install/schema.json +0 -18
- package/src/executors/run-android/compat.d.ts +0 -2
- package/src/executors/run-android/compat.js +0 -6
- package/src/executors/run-android/compat.js.map +0 -1
- package/src/executors/run-android/run-android.impl.d.ts +0 -6
- package/src/executors/run-android/run-android.impl.js +0 -72
- package/src/executors/run-android/run-android.impl.js.map +0 -1
- package/src/executors/run-android/run-android.impl.ts +0 -110
- package/src/executors/run-android/schema.d.ts +0 -24
- package/src/executors/run-android/schema.json +0 -121
- package/src/executors/run-ios/compat.d.ts +0 -2
- package/src/executors/run-ios/compat.js +0 -6
- package/src/executors/run-ios/compat.js.map +0 -1
- package/src/executors/run-ios/run-ios.impl.d.ts +0 -6
- package/src/executors/run-ios/run-ios.impl.js +0 -78
- package/src/executors/run-ios/run-ios.impl.js.map +0 -1
- package/src/executors/run-ios/run-ios.impl.ts +0 -120
- package/src/executors/run-ios/schema.d.ts +0 -12
- package/src/executors/run-ios/schema.json +0 -119
- package/src/executors/start/compat.d.ts +0 -2
- package/src/executors/start/compat.js +0 -6
- package/src/executors/start/compat.js.map +0 -1
- package/src/executors/start/lib/is-packager-running.d.ts +0 -1
- package/src/executors/start/lib/is-packager-running.js +0 -19
- package/src/executors/start/lib/is-packager-running.js.map +0 -1
- package/src/executors/start/schema.d.ts +0 -7
- package/src/executors/start/schema.json +0 -28
- package/src/executors/start/start.impl.d.ts +0 -8
- package/src/executors/start/start.impl.js +0 -99
- package/src/executors/start/start.impl.js.map +0 -1
- package/src/executors/start/start.impl.ts +0 -120
- package/src/executors/storybook/compat.d.ts +0 -2
- package/src/executors/storybook/compat.js +0 -6
- package/src/executors/storybook/compat.js.map +0 -1
- package/src/executors/storybook/schema.d.ts +0 -7
- package/src/executors/storybook/schema.json +0 -34
- package/src/executors/storybook/storybook.impl.d.ts +0 -5
- package/src/executors/storybook/storybook.impl.js +0 -76
- package/src/executors/storybook/storybook.impl.js.map +0 -1
- package/src/executors/storybook/storybook.impl.ts +0 -105
- package/src/executors/sync-deps/compat.d.ts +0 -2
- package/src/executors/sync-deps/compat.js +0 -6
- package/src/executors/sync-deps/compat.js.map +0 -1
- package/src/executors/sync-deps/schema.d.ts +0 -4
- package/src/executors/sync-deps/schema.json +0 -28
- package/src/executors/sync-deps/sync-deps.impl.d.ts +0 -8
- package/src/executors/sync-deps/sync-deps.impl.js +0 -62
- package/src/executors/sync-deps/sync-deps.impl.js.map +0 -1
- package/src/executors/sync-deps/sync-deps.impl.ts +0 -101
- package/src/generators/application/application.d.ts +0 -5
- package/src/generators/application/application.js +0 -40
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/application.spec.ts +0 -214
- package/src/generators/application/files/app/.ruby-version +0 -1
- package/src/generators/application/files/app/Gemfile.template +0 -6
- package/src/generators/application/files/app/android/app/build.gradle.template +0 -184
- package/src/generators/application/files/app/android/app/debug.keystore +0 -0
- package/src/generators/application/files/app/android/app/proguard-rules.pro +0 -10
- package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +0 -30
- package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +0 -14
- 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/AndroidManifest.xml.template +0 -26
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +0 -35
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +0 -63
- package/src/generators/application/files/app/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- 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 +0 -3
- package/src/generators/application/files/app/android/app/src/main/res/values/styles.xml +0 -9
- package/src/generators/application/files/app/android/app/src/main/res/xml/network_security_config.xml +0 -7
- package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +0 -20
- package/src/generators/application/files/app/android/build.gradle.template +0 -34
- 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 +0 -5
- package/src/generators/application/files/app/android/gradle.properties +0 -44
- package/src/generators/application/files/app/android/gradlew.bat +0 -89
- package/src/generators/application/files/app/android/gradlew.template +0 -234
- package/src/generators/application/files/app/android/settings.gradle.template +0 -7
- package/src/generators/application/files/app/app.json.template +0 -4
- package/src/generators/application/files/app/babel.config.json.template +0 -3
- package/src/generators/application/files/app/ios/.xcode.env.template +0 -12
- package/src/generators/application/files/app/ios/Podfile.template +0 -60
- package/src/generators/application/files/app/ios/__className__/AppDelegate.h +0 -6
- package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +0 -36
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/src/generators/application/files/app/ios/__className__/Images.xcassets/Contents.json +0 -6
- package/src/generators/application/files/app/ios/__className__/Info.plist.template +0 -55
- package/src/generators/application/files/app/ios/__className__/LaunchScreen.storyboard.template +0 -47
- package/src/generators/application/files/app/ios/__className__/main.m +0 -10
- package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +0 -702
- package/src/generators/application/files/app/ios/__className__.xcodeproj/xcshareddata/xcschemes/__className__.xcscheme.template +0 -88
- package/src/generators/application/files/app/ios/__className__.xcworkspace/contents.xcworkspacedata +0 -10
- package/src/generators/application/files/app/ios/__className__Tests/Info.plist +0 -24
- package/src/generators/application/files/app/ios/__className__Tests/__className__Tests.m +0 -66
- package/src/generators/application/files/app/metro.config.js.template +0 -38
- package/src/generators/application/files/app/package.json.template +0 -15
- package/src/generators/application/files/app/src/app/App.spec.tsx.template +0 -9
- package/src/generators/application/files/app/src/app/App.tsx.template +0 -694
- package/src/generators/application/files/app/src/main.tsx.template +0 -4
- package/src/generators/application/files/app/test-setup.ts.template +0 -1
- package/src/generators/application/files/app/tsconfig.app.json.template +0 -9
- package/src/generators/application/files/app/tsconfig.json.template +0 -25
- package/src/generators/application/lib/add-detox.d.ts +0 -3
- package/src/generators/application/lib/add-detox.js +0 -16
- package/src/generators/application/lib/add-detox.js.map +0 -1
- package/src/generators/application/lib/add-project.d.ts +0 -3
- package/src/generators/application/lib/add-project.js +0 -83
- package/src/generators/application/lib/add-project.js.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts +0 -3
- package/src/generators/application/lib/create-application-files.js +0 -20
- package/src/generators/application/lib/create-application-files.js.map +0 -1
- package/src/generators/application/lib/nomalize-options.spec.ts +0 -138
- package/src/generators/application/lib/normalize-options.d.ts +0 -13
- package/src/generators/application/lib/normalize-options.js +0 -36
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/schema.d.ts +0 -19
- package/src/generators/application/schema.json +0 -89
- package/src/generators/component/component.d.ts +0 -5
- package/src/generators/component/component.js +0 -53
- package/src/generators/component/component.js.map +0 -1
- package/src/generators/component/component.spec.ts +0 -135
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +0 -11
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +0 -32
- package/src/generators/component/lib/add-import.d.ts +0 -3
- package/src/generators/component/lib/add-import.js +0 -34
- package/src/generators/component/lib/add-import.js.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts +0 -8
- package/src/generators/component/lib/normalize-options.js +0 -58
- package/src/generators/component/lib/normalize-options.js.map +0 -1
- package/src/generators/component/schema.d.ts +0 -14
- package/src/generators/component/schema.json +0 -78
- package/src/generators/component-story/component-story.d.ts +0 -8
- package/src/generators/component-story/component-story.js +0 -113
- package/src/generators/component-story/component-story.js.map +0 -1
- package/src/generators/component-story/component-story.spec.ts +0 -433
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -24
- package/src/generators/component-story/schema.d.ts +0 -5
- package/src/generators/component-story/schema.json +0 -34
- package/src/generators/init/init.d.ts +0 -6
- package/src/generators/init/init.js +0 -58
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/init.spec.ts +0 -81
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +0 -2
- package/src/generators/init/lib/add-git-ignore-entry.js +0 -25
- package/src/generators/init/lib/add-git-ignore-entry.js.map +0 -1
- package/src/generators/init/lib/gitignore-entries.d.ts +0 -1
- package/src/generators/init/lib/gitignore-entries.js +0 -75
- package/src/generators/init/lib/gitignore-entries.js.map +0 -1
- package/src/generators/init/schema.d.ts +0 -7
- package/src/generators/init/schema.json +0 -40
- package/src/generators/library/files/lib/README.md +0 -7
- package/src/generators/library/files/lib/babel.config.json.template +0 -17
- package/src/generators/library/files/lib/package.json__tmpl__ +0 -4
- package/src/generators/library/files/lib/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +0 -1
- package/src/generators/library/files/lib/tsconfig.json__tmpl__ +0 -16
- package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +0 -9
- package/src/generators/library/lib/normalize-options.d.ts +0 -13
- package/src/generators/library/lib/normalize-options.js +0 -26
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/library.d.ts +0 -5
- package/src/generators/library/library.js +0 -101
- package/src/generators/library/library.js.map +0 -1
- package/src/generators/library/library.spec.ts +0 -397
- package/src/generators/library/schema.d.ts +0 -22
- package/src/generators/library/schema.json +0 -102
- package/src/generators/stories/schema.d.ts +0 -5
- package/src/generators/stories/schema.json +0 -42
- package/src/generators/stories/stories-app.spec.ts +0 -145
- package/src/generators/stories/stories-lib.spec.ts +0 -113
- package/src/generators/stories/stories.d.ts +0 -6
- package/src/generators/stories/stories.js +0 -63
- package/src/generators/stories/stories.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts +0 -5
- package/src/generators/storybook-configuration/configuration.js +0 -60
- package/src/generators/storybook-configuration/configuration.js.map +0 -1
- package/src/generators/storybook-configuration/configuration.spec.ts +0 -146
- package/src/generators/storybook-configuration/files/app/storybook.ts.template +0 -9
- package/src/generators/storybook-configuration/files/app/toggle-storybook.tsx.template +0 -114
- package/src/generators/storybook-configuration/files/root/story-loader.js.template +0 -13
- 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 -26
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.js.map +0 -1
- 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 -45
- package/src/generators/storybook-configuration/lib/create-storybook-files.js.map +0 -1
- 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 -30
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.js.map +0 -1
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +0 -65
- package/src/generators/storybook-configuration/schema.d.ts +0 -11
- package/src/generators/storybook-configuration/schema.json +0 -66
- package/src/generators/upgrade-native/lib/create-native-files.d.ts +0 -3
- package/src/generators/upgrade-native/lib/create-native-files.js +0 -15
- package/src/generators/upgrade-native/lib/create-native-files.js.map +0 -1
- package/src/generators/upgrade-native/lib/normalize-options.d.ts +0 -12
- package/src/generators/upgrade-native/lib/normalize-options.js +0 -28
- package/src/generators/upgrade-native/lib/normalize-options.js.map +0 -1
- package/src/generators/upgrade-native/schema.d.ts +0 -9
- package/src/generators/upgrade-native/schema.json +0 -41
- package/src/generators/upgrade-native/upgrade-native.d.ts +0 -9
- package/src/generators/upgrade-native/upgrade-native.js +0 -33
- package/src/generators/upgrade-native/upgrade-native.js.map +0 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.d.ts +0 -8
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js +0 -63
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.js.map +0 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +0 -79
- package/src/migrations/update-12-5-0/update-jest-for-react-native.d.ts +0 -2
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js +0 -62
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js.map +0 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.d.ts +0 -2
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +0 -22
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +0 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +0 -48
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.d.ts +0 -6
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js +0 -41
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.js.map +0 -1
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +0 -61
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +0 -6
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +0 -33
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +0 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +0 -192
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.d.ts +0 -5
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js +0 -39
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js.map +0 -1
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +0 -84
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.d.ts +0 -5
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js +0 -42
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.js.map +0 -1
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +0 -48
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.d.ts +0 -6
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.js +0 -33
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.js.map +0 -1
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +0 -190
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.d.ts +0 -5
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.js +0 -26
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.js.map +0 -1
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +0 -39
- package/src/migrations/update-14-5-8/change-searchDir-storybook.d.ts +0 -5
- package/src/migrations/update-14-5-8/change-searchDir-storybook.js +0 -26
- package/src/migrations/update-14-5-8/change-searchDir-storybook.js.map +0 -1
- package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +0 -39
- package/src/migrations/update-14-6-0/remove-jest-transform.d.ts +0 -5
- package/src/migrations/update-14-6-0/remove-jest-transform.js +0 -58
- package/src/migrations/update-14-6-0/remove-jest-transform.js.map +0 -1
- package/src/migrations/update-14-6-0/remove-jest-transform.spec.ts +0 -109
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-babel-inputs.js +0 -13
- package/src/migrations/update-15-0-0/add-babel-inputs.js.map +0 -1
- package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +0 -73
- package/src/migrations/update-15-9-1/add-build-ios-target.d.ts +0 -5
- package/src/migrations/update-15-9-1/add-build-ios-target.js +0 -34
- package/src/migrations/update-15-9-1/add-build-ios-target.js.map +0 -1
- package/src/migrations/update-15-9-1/add-build-ios-target.spec.ts +0 -36
- package/src/utils/add-jest.d.ts +0 -2
- package/src/utils/add-jest.js +0 -38
- package/src/utils/add-jest.js.map +0 -1
- package/src/utils/add-linting.d.ts +0 -12
- package/src/utils/add-linting.js +0 -41
- package/src/utils/add-linting.js.map +0 -1
- package/src/utils/add-linting.spec.ts +0 -42
- package/src/utils/chmod-android-gradle-files.d.ts +0 -3
- package/src/utils/chmod-android-gradle-files.js +0 -24
- package/src/utils/chmod-android-gradle-files.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.d.ts +0 -9
- package/src/utils/ensure-node-modules-symlink.js +0 -29
- package/src/utils/ensure-node-modules-symlink.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.spec.ts +0 -108
- package/src/utils/find-all-npm-dependencies.d.ts +0 -2
- package/src/utils/find-all-npm-dependencies.js +0 -26
- package/src/utils/find-all-npm-dependencies.js.map +0 -1
- package/src/utils/find-all-npm-dependencies.spec.ts +0 -95
- package/src/utils/format-file.d.ts +0 -1
- package/src/utils/format-file.js +0 -17
- package/src/utils/format-file.js.map +0 -1
- package/src/utils/get-cli-options.d.ts +0 -8
- package/src/utils/get-cli-options.js +0 -31
- package/src/utils/get-cli-options.js.map +0 -1
- package/src/utils/pod-install-task.d.ts +0 -8
- package/src/utils/pod-install-task.js +0 -62
- package/src/utils/pod-install-task.js.map +0 -1
- package/src/utils/symlink-task.d.ts +0 -2
- package/src/utils/symlink-task.js +0 -19
- package/src/utils/symlink-task.js.map +0 -1
- package/src/utils/testing-generators.d.ts +0 -3
- package/src/utils/testing-generators.js +0 -36
- package/src/utils/testing-generators.js.map +0 -1
- package/src/utils/versions.d.ts +0 -20
- package/src/utils/versions.js +0 -24
- package/src/utils/versions.js.map +0 -1
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
readJson,
|
|
3
|
-
readProjectConfiguration,
|
|
4
|
-
Tree,
|
|
5
|
-
updateJson,
|
|
6
|
-
} from '@nrwl/devkit';
|
|
7
|
-
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
|
|
8
|
-
import libraryGenerator from './library';
|
|
9
|
-
import { Linter } from '@nrwl/linter';
|
|
10
|
-
import { Schema } from './schema';
|
|
11
|
-
|
|
12
|
-
describe('lib', () => {
|
|
13
|
-
let appTree: Tree;
|
|
14
|
-
|
|
15
|
-
const defaultSchema: Schema = {
|
|
16
|
-
name: 'myLib',
|
|
17
|
-
linter: Linter.EsLint,
|
|
18
|
-
skipFormat: false,
|
|
19
|
-
skipTsConfig: false,
|
|
20
|
-
unitTestRunner: 'jest',
|
|
21
|
-
strict: true,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
beforeEach(() => {
|
|
25
|
-
appTree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
|
|
26
|
-
appTree.write('.gitignore', '');
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe('not nested', () => {
|
|
30
|
-
it('should update project.json', async () => {
|
|
31
|
-
await libraryGenerator(appTree, { ...defaultSchema, tags: 'one,two' });
|
|
32
|
-
const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
|
|
33
|
-
expect(projectConfiguration.root).toEqual('libs/my-lib');
|
|
34
|
-
expect(projectConfiguration.targets.build).toBeUndefined();
|
|
35
|
-
expect(projectConfiguration.targets.lint).toEqual({
|
|
36
|
-
executor: '@nrwl/linter:eslint',
|
|
37
|
-
outputs: ['{options.outputFile}'],
|
|
38
|
-
options: {
|
|
39
|
-
lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
expect(projectConfiguration.tags).toEqual(['one', 'two']);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should update root tsconfig.base.json', async () => {
|
|
46
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
47
|
-
const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
|
|
48
|
-
expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
|
|
49
|
-
'libs/my-lib/src/index.ts',
|
|
50
|
-
]);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('should update root tsconfig.json when no tsconfig.base.json', async () => {
|
|
54
|
-
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
55
|
-
|
|
56
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
57
|
-
|
|
58
|
-
const tsconfigJson = readJson(appTree, '/tsconfig.json');
|
|
59
|
-
expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
|
|
60
|
-
'libs/my-lib/src/index.ts',
|
|
61
|
-
]);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('should update root tsconfig.base.json (no existing path mappings)', async () => {
|
|
65
|
-
updateJson(appTree, 'tsconfig.base.json', (json) => {
|
|
66
|
-
json.compilerOptions.paths = undefined;
|
|
67
|
-
return json;
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
71
|
-
const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
|
|
72
|
-
expect(tsconfigJson.compilerOptions.paths['@proj/my-lib']).toEqual([
|
|
73
|
-
'libs/my-lib/src/index.ts',
|
|
74
|
-
]);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('should create a local tsconfig.json', async () => {
|
|
78
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
79
|
-
|
|
80
|
-
const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.json');
|
|
81
|
-
expect(tsconfigJson.extends).toBe('../../tsconfig.base.json');
|
|
82
|
-
expect(tsconfigJson.references).toEqual([
|
|
83
|
-
{
|
|
84
|
-
path: './tsconfig.lib.json',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
path: './tsconfig.spec.json',
|
|
88
|
-
},
|
|
89
|
-
]);
|
|
90
|
-
expect(
|
|
91
|
-
tsconfigJson.compilerOptions.forceConsistentCasingInFileNames
|
|
92
|
-
).toEqual(true);
|
|
93
|
-
expect(tsconfigJson.compilerOptions.strict).toEqual(true);
|
|
94
|
-
expect(tsconfigJson.compilerOptions.noImplicitReturns).toEqual(true);
|
|
95
|
-
expect(tsconfigJson.compilerOptions.noFallthroughCasesInSwitch).toEqual(
|
|
96
|
-
true
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
|
|
101
|
-
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
102
|
-
|
|
103
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
104
|
-
|
|
105
|
-
const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.json');
|
|
106
|
-
expect(tsconfigJson.extends).toBe('../../tsconfig.json');
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it('should extend the local tsconfig.json with tsconfig.spec.json', async () => {
|
|
110
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
111
|
-
const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.spec.json');
|
|
112
|
-
expect(tsconfigJson.extends).toEqual('./tsconfig.json');
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
it('should extend the local tsconfig.json with tsconfig.lib.json', async () => {
|
|
116
|
-
await libraryGenerator(appTree, defaultSchema);
|
|
117
|
-
const tsconfigJson = readJson(appTree, 'libs/my-lib/tsconfig.lib.json');
|
|
118
|
-
expect(tsconfigJson.extends).toEqual('./tsconfig.json');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
describe('nested', () => {
|
|
123
|
-
it('should update nx.json', async () => {
|
|
124
|
-
await libraryGenerator(appTree, {
|
|
125
|
-
...defaultSchema,
|
|
126
|
-
directory: 'myDir',
|
|
127
|
-
tags: 'one',
|
|
128
|
-
});
|
|
129
|
-
const projectConfiguration = readProjectConfiguration(
|
|
130
|
-
appTree,
|
|
131
|
-
'my-dir-my-lib'
|
|
132
|
-
);
|
|
133
|
-
expect(projectConfiguration).toMatchObject({
|
|
134
|
-
tags: ['one'],
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
await libraryGenerator(appTree, {
|
|
138
|
-
...defaultSchema,
|
|
139
|
-
name: 'myLib2',
|
|
140
|
-
directory: 'myDir',
|
|
141
|
-
tags: 'one,two',
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
const lib2ProjectConfiguration = readProjectConfiguration(
|
|
145
|
-
appTree,
|
|
146
|
-
'my-dir-my-lib2'
|
|
147
|
-
);
|
|
148
|
-
expect(lib2ProjectConfiguration).toMatchObject({
|
|
149
|
-
tags: ['one', 'two'],
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
it('should update project.json', async () => {
|
|
154
|
-
await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
|
|
155
|
-
const projectConfiguration = readProjectConfiguration(
|
|
156
|
-
appTree,
|
|
157
|
-
'my-dir-my-lib'
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
expect(projectConfiguration.root).toEqual('libs/my-dir/my-lib');
|
|
161
|
-
expect(projectConfiguration.targets.lint).toEqual({
|
|
162
|
-
executor: '@nrwl/linter:eslint',
|
|
163
|
-
outputs: ['{options.outputFile}'],
|
|
164
|
-
options: {
|
|
165
|
-
lintFilePatterns: ['libs/my-dir/my-lib/**/*.{ts,tsx,js,jsx}'],
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
it('should update root tsconfig.base.json', async () => {
|
|
171
|
-
await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
|
|
172
|
-
const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
|
|
173
|
-
expect(tsconfigJson.compilerOptions.paths['@proj/my-dir/my-lib']).toEqual(
|
|
174
|
-
['libs/my-dir/my-lib/src/index.ts']
|
|
175
|
-
);
|
|
176
|
-
expect(
|
|
177
|
-
tsconfigJson.compilerOptions.paths['my-dir-my-lib/*']
|
|
178
|
-
).toBeUndefined();
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
it('should update root tsconfig.json when no tsconfig.base.json', async () => {
|
|
182
|
-
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
183
|
-
|
|
184
|
-
await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
|
|
185
|
-
|
|
186
|
-
const tsconfigJson = readJson(appTree, '/tsconfig.json');
|
|
187
|
-
expect(tsconfigJson.compilerOptions.paths['@proj/my-dir/my-lib']).toEqual(
|
|
188
|
-
['libs/my-dir/my-lib/src/index.ts']
|
|
189
|
-
);
|
|
190
|
-
expect(
|
|
191
|
-
tsconfigJson.compilerOptions.paths['my-dir-my-lib/*']
|
|
192
|
-
).toBeUndefined();
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
it('should create a local tsconfig.json', async () => {
|
|
196
|
-
await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
|
|
197
|
-
|
|
198
|
-
const tsconfigJson = readJson(
|
|
199
|
-
appTree,
|
|
200
|
-
'libs/my-dir/my-lib/tsconfig.json'
|
|
201
|
-
);
|
|
202
|
-
expect(tsconfigJson.extends).toBe('../../../tsconfig.base.json');
|
|
203
|
-
expect(tsconfigJson.references).toEqual([
|
|
204
|
-
{
|
|
205
|
-
path: './tsconfig.lib.json',
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
path: './tsconfig.spec.json',
|
|
209
|
-
},
|
|
210
|
-
]);
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
|
|
214
|
-
appTree.rename('tsconfig.base.json', 'tsconfig.json');
|
|
215
|
-
|
|
216
|
-
await libraryGenerator(appTree, { ...defaultSchema, directory: 'myDir' });
|
|
217
|
-
|
|
218
|
-
const tsconfigJson = readJson(
|
|
219
|
-
appTree,
|
|
220
|
-
'libs/my-dir/my-lib/tsconfig.json'
|
|
221
|
-
);
|
|
222
|
-
expect(tsconfigJson.extends).toBe('../../../tsconfig.json');
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
describe('--unit-test-runner none', () => {
|
|
227
|
-
it('should not generate test configuration', async () => {
|
|
228
|
-
await libraryGenerator(appTree, {
|
|
229
|
-
...defaultSchema,
|
|
230
|
-
unitTestRunner: 'none',
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
expect(appTree.exists('libs/my-lib/tsconfig.spec.json')).toBeFalsy();
|
|
234
|
-
expect(appTree.exists('libs/my-lib/jest.config.ts')).toBeFalsy();
|
|
235
|
-
const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
|
|
236
|
-
expect(projectConfiguration.targets.test).toBeUndefined();
|
|
237
|
-
expect(projectConfiguration.targets.lint).toMatchObject({
|
|
238
|
-
executor: '@nrwl/linter:eslint',
|
|
239
|
-
options: {
|
|
240
|
-
lintFilePatterns: ['libs/my-lib/**/*.{ts,tsx,js,jsx}'],
|
|
241
|
-
},
|
|
242
|
-
outputs: ['{options.outputFile}'],
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
describe('--buildable', () => {
|
|
248
|
-
it('should have a builder defined', async () => {
|
|
249
|
-
await libraryGenerator(appTree, {
|
|
250
|
-
...defaultSchema,
|
|
251
|
-
buildable: true,
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
|
|
255
|
-
|
|
256
|
-
expect(projectConfiguration.targets.build).toBeDefined();
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
describe('--publishable', () => {
|
|
261
|
-
it('should add build architect', async () => {
|
|
262
|
-
await libraryGenerator(appTree, {
|
|
263
|
-
...defaultSchema,
|
|
264
|
-
publishable: true,
|
|
265
|
-
importPath: '@proj/my-lib',
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
const projectConfiguration = readProjectConfiguration(appTree, 'my-lib');
|
|
269
|
-
|
|
270
|
-
expect(projectConfiguration.targets.build).toMatchObject({
|
|
271
|
-
executor: '@nrwl/web:rollup',
|
|
272
|
-
outputs: ['{options.outputPath}'],
|
|
273
|
-
options: {
|
|
274
|
-
external: ['react/jsx-runtime', 'react-native'],
|
|
275
|
-
entryFile: 'libs/my-lib/src/index.ts',
|
|
276
|
-
outputPath: 'dist/libs/my-lib',
|
|
277
|
-
project: 'libs/my-lib/package.json',
|
|
278
|
-
tsConfig: 'libs/my-lib/tsconfig.lib.json',
|
|
279
|
-
rollupConfig: '@nrwl/react/plugins/bundle-rollup',
|
|
280
|
-
},
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
it('should fail if no importPath is provided with publishable', async () => {
|
|
285
|
-
expect.assertions(1);
|
|
286
|
-
|
|
287
|
-
try {
|
|
288
|
-
await libraryGenerator(appTree, {
|
|
289
|
-
...defaultSchema,
|
|
290
|
-
directory: 'myDir',
|
|
291
|
-
publishable: true,
|
|
292
|
-
});
|
|
293
|
-
} catch (e) {
|
|
294
|
-
expect(e.message).toContain(
|
|
295
|
-
'For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)'
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
it('should add package.json and .babelrc', async () => {
|
|
301
|
-
await libraryGenerator(appTree, {
|
|
302
|
-
...defaultSchema,
|
|
303
|
-
publishable: true,
|
|
304
|
-
importPath: '@proj/my-lib',
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
const packageJson = readJson(appTree, '/libs/my-lib/package.json');
|
|
308
|
-
expect(packageJson.name).toEqual('@proj/my-lib');
|
|
309
|
-
expect(appTree.exists('/libs/my-lib/.babelrc'));
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
describe('--js', () => {
|
|
314
|
-
it('should generate JS files', async () => {
|
|
315
|
-
await libraryGenerator(appTree, {
|
|
316
|
-
...defaultSchema,
|
|
317
|
-
js: true,
|
|
318
|
-
});
|
|
319
|
-
|
|
320
|
-
expect(appTree.exists('/libs/my-lib/src/index.js')).toBe(true);
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
describe('--importPath', () => {
|
|
325
|
-
it('should update the package.json & tsconfig with the given import path', async () => {
|
|
326
|
-
await libraryGenerator(appTree, {
|
|
327
|
-
...defaultSchema,
|
|
328
|
-
publishable: true,
|
|
329
|
-
directory: 'myDir',
|
|
330
|
-
importPath: '@myorg/lib',
|
|
331
|
-
});
|
|
332
|
-
const packageJson = readJson(appTree, 'libs/my-dir/my-lib/package.json');
|
|
333
|
-
const tsconfigJson = readJson(appTree, '/tsconfig.base.json');
|
|
334
|
-
|
|
335
|
-
expect(packageJson.name).toBe('@myorg/lib');
|
|
336
|
-
expect(
|
|
337
|
-
tsconfigJson.compilerOptions.paths[packageJson.name]
|
|
338
|
-
).toBeDefined();
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
it('should fail if the same importPath has already been used', async () => {
|
|
342
|
-
await libraryGenerator(appTree, {
|
|
343
|
-
...defaultSchema,
|
|
344
|
-
name: 'myLib1',
|
|
345
|
-
publishable: true,
|
|
346
|
-
importPath: '@myorg/lib',
|
|
347
|
-
});
|
|
348
|
-
|
|
349
|
-
try {
|
|
350
|
-
await libraryGenerator(appTree, {
|
|
351
|
-
...defaultSchema,
|
|
352
|
-
name: 'myLib2',
|
|
353
|
-
publishable: true,
|
|
354
|
-
importPath: '@myorg/lib',
|
|
355
|
-
});
|
|
356
|
-
} catch (e) {
|
|
357
|
-
expect(e.message).toContain(
|
|
358
|
-
'You already have a library using the import path'
|
|
359
|
-
);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
expect.assertions(1);
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
describe('--no-strict', () => {
|
|
367
|
-
it('should not add options for strict mode', async () => {
|
|
368
|
-
await libraryGenerator(appTree, {
|
|
369
|
-
...defaultSchema,
|
|
370
|
-
strict: false,
|
|
371
|
-
});
|
|
372
|
-
const tsconfigJson = readJson(appTree, '/libs/my-lib/tsconfig.json');
|
|
373
|
-
|
|
374
|
-
expect(
|
|
375
|
-
tsconfigJson.compilerOptions.forceConsistentCasingInFileNames
|
|
376
|
-
).not.toBeDefined();
|
|
377
|
-
expect(tsconfigJson.compilerOptions.strict).not.toBeDefined();
|
|
378
|
-
expect(tsconfigJson.compilerOptions.noImplicitReturns).not.toBeDefined();
|
|
379
|
-
expect(
|
|
380
|
-
tsconfigJson.compilerOptions.noFallthroughCasesInSwitch
|
|
381
|
-
).not.toBeDefined();
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
describe('--skipPackageJson', () => {
|
|
386
|
-
it('should not add or update dependencies when true', async () => {
|
|
387
|
-
const packageJsonBefore = readJson(appTree, 'package.json');
|
|
388
|
-
|
|
389
|
-
await libraryGenerator(appTree, {
|
|
390
|
-
...defaultSchema,
|
|
391
|
-
skipPackageJson: true,
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
expect(readJson(appTree, 'package.json')).toEqual(packageJsonBefore);
|
|
395
|
-
});
|
|
396
|
-
});
|
|
397
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Linter } from '@nrwl/linter';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Same as the @nrwl/react library schema, except it removes keys: style, component, routing, appProject
|
|
5
|
-
*/
|
|
6
|
-
export interface Schema {
|
|
7
|
-
name: string;
|
|
8
|
-
directory?: string;
|
|
9
|
-
skipTsConfig: boolean;
|
|
10
|
-
skipFormat: boolean;
|
|
11
|
-
tags?: string;
|
|
12
|
-
pascalCaseFiles?: boolean;
|
|
13
|
-
unitTestRunner: 'jest' | 'none';
|
|
14
|
-
linter: Linter;
|
|
15
|
-
publishable?: boolean;
|
|
16
|
-
buildable?: boolean;
|
|
17
|
-
importPath?: string;
|
|
18
|
-
js?: boolean;
|
|
19
|
-
strict?: boolean;
|
|
20
|
-
setParserOptionsProject?: boolean;
|
|
21
|
-
skipPackageJson?: boolean; //default is false
|
|
22
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cli": "nx",
|
|
3
|
-
"$id": "NxReactNativeLibrary",
|
|
4
|
-
"$schema": "http://json-schema.org/schema",
|
|
5
|
-
"title": "Create a React Native Library for Nx",
|
|
6
|
-
"description": "Create a React Native Library for Nx.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g @nrwl/react-native:lib mylib --directory=myapp",
|
|
11
|
-
"description": "Generate `libs/myapp/mylib`"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"properties": {
|
|
15
|
-
"name": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Library name.",
|
|
18
|
-
"$default": {
|
|
19
|
-
"$source": "argv",
|
|
20
|
-
"index": 0
|
|
21
|
-
},
|
|
22
|
-
"x-prompt": "What name would you like to use for the library?",
|
|
23
|
-
"pattern": "^[a-zA-Z].*$"
|
|
24
|
-
},
|
|
25
|
-
"directory": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"description": "A directory where the lib is placed.",
|
|
28
|
-
"alias": "dir",
|
|
29
|
-
"x-priority": "important"
|
|
30
|
-
},
|
|
31
|
-
"linter": {
|
|
32
|
-
"description": "The tool to use for running lint checks.",
|
|
33
|
-
"type": "string",
|
|
34
|
-
"enum": ["eslint"],
|
|
35
|
-
"default": "eslint"
|
|
36
|
-
},
|
|
37
|
-
"unitTestRunner": {
|
|
38
|
-
"type": "string",
|
|
39
|
-
"enum": ["jest", "none"],
|
|
40
|
-
"description": "Test runner to use for unit tests.",
|
|
41
|
-
"default": "jest"
|
|
42
|
-
},
|
|
43
|
-
"tags": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "Add tags to the library (used for linting).",
|
|
46
|
-
"alias": "t"
|
|
47
|
-
},
|
|
48
|
-
"skipFormat": {
|
|
49
|
-
"description": "Skip formatting files.",
|
|
50
|
-
"type": "boolean",
|
|
51
|
-
"default": false,
|
|
52
|
-
"x-priority": "internal"
|
|
53
|
-
},
|
|
54
|
-
"skipTsConfig": {
|
|
55
|
-
"type": "boolean",
|
|
56
|
-
"default": false,
|
|
57
|
-
"description": "Do not update `tsconfig.json` for development experience.",
|
|
58
|
-
"x-priority": "internal"
|
|
59
|
-
},
|
|
60
|
-
"pascalCaseFiles": {
|
|
61
|
-
"type": "boolean",
|
|
62
|
-
"description": "Use pascal case component file name (e.g. `App.tsx`).",
|
|
63
|
-
"alias": "P",
|
|
64
|
-
"default": false
|
|
65
|
-
},
|
|
66
|
-
"publishable": {
|
|
67
|
-
"type": "boolean",
|
|
68
|
-
"description": "Create a publishable library."
|
|
69
|
-
},
|
|
70
|
-
"buildable": {
|
|
71
|
-
"type": "boolean",
|
|
72
|
-
"default": false,
|
|
73
|
-
"description": "Generate a buildable library."
|
|
74
|
-
},
|
|
75
|
-
"importPath": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"description": "The library name used to import it, like `@myorg/my-awesome-lib`."
|
|
78
|
-
},
|
|
79
|
-
"js": {
|
|
80
|
-
"type": "boolean",
|
|
81
|
-
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
82
|
-
"default": false
|
|
83
|
-
},
|
|
84
|
-
"strict": {
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"description": "Whether to enable tsconfig strict mode or not.",
|
|
87
|
-
"default": true
|
|
88
|
-
},
|
|
89
|
-
"setParserOptionsProject": {
|
|
90
|
-
"type": "boolean",
|
|
91
|
-
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
92
|
-
"default": false
|
|
93
|
-
},
|
|
94
|
-
"skipPackageJson": {
|
|
95
|
-
"description": "Do not add dependencies to `package.json`.",
|
|
96
|
-
"type": "boolean",
|
|
97
|
-
"default": false,
|
|
98
|
-
"x-priority": "internal"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"required": ["name"]
|
|
102
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"$id": "NxReactNativeStorybookStories",
|
|
5
|
-
"title": "Generate React Native Storybook stories",
|
|
6
|
-
"description": "Generate stories/specs for all components declared in a React Native project.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"project": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"aliases": ["name", "projectName"],
|
|
12
|
-
"description": "Project for which to generate stories.",
|
|
13
|
-
"$default": {
|
|
14
|
-
"$source": "projectName",
|
|
15
|
-
"index": 0
|
|
16
|
-
},
|
|
17
|
-
"x-prompt": "For which project do you want to generate stories?"
|
|
18
|
-
},
|
|
19
|
-
"ignorePaths": {
|
|
20
|
-
"type": "array",
|
|
21
|
-
"description": "Paths to ignore when looking for components.",
|
|
22
|
-
"items": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Path to ignore."
|
|
25
|
-
},
|
|
26
|
-
"examples": [
|
|
27
|
-
"apps/my-app/src/not-stories/**",
|
|
28
|
-
"**/**/src/**/not-stories/**",
|
|
29
|
-
"libs/my-lib/**/*.something.ts",
|
|
30
|
-
"**/**/src/**/*.other.*",
|
|
31
|
-
"libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"skipFormat": {
|
|
35
|
-
"description": "Skip formatting files.",
|
|
36
|
-
"type": "boolean",
|
|
37
|
-
"default": false,
|
|
38
|
-
"x-priority": "internal"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"required": ["project"]
|
|
42
|
-
}
|