@nx/react 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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/ast-utils.d.ts +1 -0
- package/ast-utils.js +12 -0
- package/ast-utils.js.map +1 -0
- package/babel.d.ts +16 -0
- package/babel.js +52 -0
- package/babel.js.map +1 -0
- package/executors.json +26 -0
- package/generators.json +223 -0
- package/index.d.ts +21 -0
- package/index.js +47 -0
- package/index.js.map +1 -0
- package/migrations.json +870 -0
- package/module-federation.d.ts +4 -0
- package/module-federation.js +13 -0
- package/module-federation.js.map +1 -0
- package/package.json +49 -0
- package/plugins/bundle-rollup.d.ts +1 -0
- package/plugins/bundle-rollup.js +42 -0
- package/plugins/bundle-rollup.js.map +1 -0
- package/plugins/component-testing/index.d.ts +38 -0
- package/plugins/component-testing/index.js +122 -0
- package/plugins/component-testing/index.js.map +1 -0
- package/plugins/component-testing/webpack-fallback.d.ts +5 -0
- package/plugins/component-testing/webpack-fallback.js +135 -0
- package/plugins/component-testing/webpack-fallback.js.map +1 -0
- package/plugins/jest.d.ts +1 -0
- package/plugins/jest.js +62 -0
- package/plugins/jest.js.map +1 -0
- package/plugins/storybook/index.d.ts +3 -0
- package/plugins/storybook/index.js +77 -0
- package/plugins/storybook/index.js.map +1 -0
- package/plugins/storybook/merge-plugins.d.ts +3 -0
- package/plugins/storybook/merge-plugins.js +18 -0
- package/plugins/storybook/merge-plugins.js.map +1 -0
- package/plugins/webpack.d.ts +3 -0
- package/plugins/webpack.js +15 -0
- package/plugins/webpack.js.map +1 -0
- package/plugins/with-react.d.ts +12 -0
- package/plugins/with-react.js +82 -0
- package/plugins/with-react.js.map +1 -0
- package/src/executors/module-federation-dev-server/compat.d.ts +2 -0
- package/src/executors/module-federation-dev-server/compat.js +6 -0
- package/src/executors/module-federation-dev-server/compat.js.map +1 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +11 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +55 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js.map +1 -0
- package/src/executors/module-federation-dev-server/schema.json +96 -0
- package/src/executors/module-federation-ssr-dev-server/compat.d.ts +2 -0
- package/src/executors/module-federation-ssr-dev-server/compat.js +6 -0
- package/src/executors/module-federation-ssr-dev-server/compat.js.map +1 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +9 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +71 -0
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js.map +1 -0
- package/src/executors/module-federation-ssr-dev-server/schema.json +48 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +129 -0
- package/src/generators/application/application.js.map +1 -0
- package/src/generators/application/files/base-vite/index.html__tmpl__ +16 -0
- package/src/generators/application/files/base-vite/public/favicon.ico +0 -0
- package/src/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-vite/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/base-vite/src/environments/environment.prod.ts__tmpl__ +3 -0
- package/src/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +6 -0
- package/src/generators/application/files/base-vite/src/main.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +14 -0
- package/src/generators/application/files/base-webpack/.babelrc__tmpl__ +13 -0
- package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-webpack/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/base-webpack/src/environments/environment.prod.ts__tmpl__ +3 -0
- package/src/generators/application/files/base-webpack/src/environments/environment.ts__tmpl__ +6 -0
- package/src/generators/application/files/base-webpack/src/favicon.ico +0 -0
- package/src/generators/application/files/base-webpack/src/index.html +14 -0
- package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +14 -0
- package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +9 -0
- package/src/generators/application/files/nx-welcome/src/app/nx-welcome.tsx +845 -0
- package/src/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +1 -0
- package/src/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +37 -0
- package/src/generators/application/files/style-css-module/src/styles.__style__ +1 -0
- package/src/generators/application/files/style-global-css/src/app/__fileName__.__style__ +1 -0
- package/src/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +36 -0
- package/src/generators/application/files/style-global-css/src/styles.__style__ +1 -0
- package/src/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +35 -0
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +29 -0
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +40 -0
- package/src/generators/application/lib/add-cypress.d.ts +3 -0
- package/src/generators/application/lib/add-cypress.js +22 -0
- package/src/generators/application/lib/add-cypress.js.map +1 -0
- package/src/generators/application/lib/add-jest.d.ts +3 -0
- package/src/generators/application/lib/add-jest.js +17 -0
- package/src/generators/application/lib/add-jest.js.map +1 -0
- package/src/generators/application/lib/add-project.d.ts +2 -0
- package/src/generators/application/lib/add-project.js +98 -0
- package/src/generators/application/lib/add-project.js.map +1 -0
- package/src/generators/application/lib/add-routing.d.ts +3 -0
- package/src/generators/application/lib/add-routing.js +32 -0
- package/src/generators/application/lib/add-routing.js.map +1 -0
- package/src/generators/application/lib/create-application-files.d.ts +3 -0
- package/src/generators/application/lib/create-application-files.js +47 -0
- package/src/generators/application/lib/create-application-files.js.map +1 -0
- package/src/generators/application/lib/find-free-port.d.ts +2 -0
- package/src/generators/application/lib/find-free-port.js +18 -0
- package/src/generators/application/lib/find-free-port.js.map +1 -0
- package/src/generators/application/lib/get-app-tests.d.ts +2 -0
- package/src/generators/application/lib/get-app-tests.js +22 -0
- package/src/generators/application/lib/get-app-tests.js.map +1 -0
- package/src/generators/application/lib/install-common-dependencies.d.ts +3 -0
- package/src/generators/application/lib/install-common-dependencies.js +29 -0
- package/src/generators/application/lib/install-common-dependencies.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +5 -0
- package/src/generators/application/lib/normalize-options.js +60 -0
- package/src/generators/application/lib/normalize-options.js.map +1 -0
- package/src/generators/application/lib/set-defaults.d.ts +3 -0
- package/src/generators/application/lib/set-defaults.js +23 -0
- package/src/generators/application/lib/set-defaults.js.map +1 -0
- package/src/generators/application/lib/update-jest-config.d.ts +3 -0
- package/src/generators/application/lib/update-jest-config.js +30 -0
- package/src/generators/application/lib/update-jest-config.js.map +1 -0
- package/src/generators/application/schema.d.ts +44 -0
- package/src/generators/application/schema.json +196 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +141 -0
- package/src/generators/component/component.js.map +1 -0
- package/src/generators/component/files/__fileName__.__style__ +0 -0
- package/src/generators/component/files/__fileName__.module.__style__ +7 -0
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +7 -0
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +71 -0
- package/src/generators/component/get-component-tests.d.ts +2 -0
- package/src/generators/component/get-component-tests.js +13 -0
- package/src/generators/component/get-component-tests.js.map +1 -0
- package/src/generators/component/noramlized-schema.d.ts +8 -0
- package/src/generators/component/noramlized-schema.js +3 -0
- package/src/generators/component/noramlized-schema.js.map +1 -0
- package/src/generators/component/schema.d.ts +20 -0
- package/src/generators/component/schema.json +153 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +14 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.js +105 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.js.map +1 -0
- package/src/generators/component-cypress-spec/files/__componentName__.__fileExt__ +13 -0
- package/src/generators/component-cypress-spec/schema.json +44 -0
- package/src/generators/component-story/component-story.d.ts +12 -0
- package/src/generators/component-story/component-story.js +81 -0
- package/src/generators/component-story/component-story.js.map +1 -0
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +32 -0
- package/src/generators/component-story/schema.json +36 -0
- package/src/generators/component-test/component-test.d.ts +4 -0
- package/src/generators/component-test/component-test.js +78 -0
- package/src/generators/component-test/component-test.js.map +1 -0
- package/src/generators/component-test/files/__fileName__.cy__ext__ +21 -0
- package/src/generators/component-test/schema.d.ts +4 -0
- package/src/generators/component-test/schema.js +3 -0
- package/src/generators/component-test/schema.js.map +1 -0
- package/src/generators/component-test/schema.json +31 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +9 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +34 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js.map +1 -0
- package/src/generators/cypress-component-configuration/files/cypress/support/commands.ts__tpl__ +42 -0
- package/src/generators/cypress-component-configuration/files/cypress.config.ts__tpl__ +8 -0
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +4 -0
- package/src/generators/cypress-component-configuration/lib/add-files.js +75 -0
- package/src/generators/cypress-component-configuration/lib/add-files.js.map +1 -0
- package/src/generators/cypress-component-configuration/lib/update-configs.d.ts +7 -0
- package/src/generators/cypress-component-configuration/lib/update-configs.js +30 -0
- package/src/generators/cypress-component-configuration/lib/update-configs.js.map +1 -0
- package/src/generators/cypress-component-configuration/schema.d.ts +7 -0
- package/src/generators/cypress-component-configuration/schema.json +54 -0
- package/src/generators/hook/files/__fileName__.spec.tsx__tmpl__ +18 -0
- package/src/generators/hook/files/__fileName__.ts__tmpl__ +15 -0
- package/src/generators/hook/hook.d.ts +5 -0
- package/src/generators/hook/hook.js +117 -0
- package/src/generators/hook/hook.js.map +1 -0
- package/src/generators/hook/schema.d.ts +11 -0
- package/src/generators/hook/schema.json +77 -0
- package/src/generators/host/files/common/src/app/__fileName__.tsx__tmpl__ +33 -0
- package/src/generators/host/files/module-federation/module-federation.config.js__tmpl__ +6 -0
- package/src/generators/host/files/module-federation/src/main.ts__tmpl__ +1 -0
- package/src/generators/host/files/module-federation/src/remotes.d.ts__tmpl__ +4 -0
- package/src/generators/host/files/module-federation/webpack.config.js__tmpl__ +12 -0
- package/src/generators/host/files/module-federation/webpack.config.prod.js__tmpl__ +32 -0
- package/src/generators/host/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +13 -0
- package/src/generators/host/files/module-federation-ssr/server.ts__tmpl__ +28 -0
- package/src/generators/host/files/module-federation-ssr/tsconfig.server.json__tmpl__ +15 -0
- package/src/generators/host/files/module-federation-ssr/webpack.server.config.js__tmpl__ +12 -0
- package/src/generators/host/host.d.ts +4 -0
- package/src/generators/host/host.js +67 -0
- package/src/generators/host/host.js.map +1 -0
- package/src/generators/host/lib/add-module-federation-files.d.ts +5 -0
- package/src/generators/host/lib/add-module-federation-files.js +21 -0
- package/src/generators/host/lib/add-module-federation-files.js.map +1 -0
- package/src/generators/host/lib/setup-ssr-for-host.d.ts +6 -0
- package/src/generators/host/lib/setup-ssr-for-host.js +27 -0
- package/src/generators/host/lib/setup-ssr-for-host.js.map +1 -0
- package/src/generators/host/lib/update-module-federation-e2e-project.d.ts +3 -0
- package/src/generators/host/lib/update-module-federation-e2e-project.js +16 -0
- package/src/generators/host/lib/update-module-federation-e2e-project.js.map +1 -0
- package/src/generators/host/schema.d.ts +31 -0
- package/src/generators/host/schema.json +168 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +80 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.ts +11 -0
- package/src/generators/init/schema.json +49 -0
- package/src/generators/library/files/common/.babelrc__tmpl__ +16 -0
- package/src/generators/library/files/common/README.md +7 -0
- package/src/generators/library/files/common/package.json__tmpl__ +4 -0
- package/src/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +14 -0
- package/src/generators/library/files/vite/README.md +7 -0
- package/src/generators/library/files/vite/package.json__tmpl__ +12 -0
- package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +14 -0
- package/src/generators/library/lib/add-linting.d.ts +3 -0
- package/src/generators/library/lib/add-linting.js +38 -0
- package/src/generators/library/lib/add-linting.js.map +1 -0
- package/src/generators/library/lib/add-rollup-build-target.d.ts +3 -0
- package/src/generators/library/lib/add-rollup-build-target.js +59 -0
- package/src/generators/library/lib/add-rollup-build-target.js.map +1 -0
- package/src/generators/library/lib/create-files.d.ts +3 -0
- package/src/generators/library/lib/create-files.js +26 -0
- package/src/generators/library/lib/create-files.js.map +1 -0
- package/src/generators/library/lib/install-common-dependencies.d.ts +3 -0
- package/src/generators/library/lib/install-common-dependencies.js +30 -0
- package/src/generators/library/lib/install-common-dependencies.js.map +1 -0
- package/src/generators/library/lib/maybe-js.d.ts +2 -0
- package/src/generators/library/lib/maybe-js.js +10 -0
- package/src/generators/library/lib/maybe-js.js.map +1 -0
- package/src/generators/library/lib/normalize-options.d.ts +3 -0
- package/src/generators/library/lib/normalize-options.js +57 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/lib/set-defaults.d.ts +3 -0
- package/src/generators/library/lib/set-defaults.js +16 -0
- package/src/generators/library/lib/set-defaults.js.map +1 -0
- package/src/generators/library/lib/update-app-routes.d.ts +3 -0
- package/src/generators/library/lib/update-app-routes.js +63 -0
- package/src/generators/library/lib/update-app-routes.js.map +1 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +128 -0
- package/src/generators/library/library.js.map +1 -0
- package/src/generators/library/schema.d.ts +43 -0
- package/src/generators/library/schema.json +192 -0
- package/src/generators/redux/files/__directory__/__fileName__.slice.spec.ts__tmpl__ +53 -0
- package/src/generators/redux/files/__directory__/__fileName__.slice.ts__tmpl__ +129 -0
- package/src/generators/redux/redux.d.ts +5 -0
- package/src/generators/redux/redux.js +117 -0
- package/src/generators/redux/redux.js.map +1 -0
- package/src/generators/redux/schema.d.ts +20 -0
- package/src/generators/redux/schema.json +47 -0
- package/src/generators/remote/files/module-federation/module-federation.config.js__tmpl__ +6 -0
- package/src/generators/remote/files/module-federation/src/main.ts__tmpl__ +1 -0
- package/src/generators/remote/files/module-federation/src/remote-entry.ts__tmpl__ +1 -0
- package/src/generators/remote/files/module-federation/webpack.config.js__tmpl__ +12 -0
- package/src/generators/remote/files/module-federation/webpack.config.prod.js__tmpl__ +1 -0
- package/src/generators/remote/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +6 -0
- package/src/generators/remote/files/module-federation-ssr/server.ts__tmpl__ +45 -0
- package/src/generators/remote/files/module-federation-ssr/webpack.server.config.js__tmpl__ +12 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts +4 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.js +32 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.js.map +1 -0
- package/src/generators/remote/lib/update-host-with-remote.d.ts +2 -0
- package/src/generators/remote/lib/update-host-with-remote.js +53 -0
- package/src/generators/remote/lib/update-host-with-remote.js.map +1 -0
- package/src/generators/remote/remote.d.ts +6 -0
- package/src/generators/remote/remote.js +56 -0
- package/src/generators/remote/remote.js.map +1 -0
- package/src/generators/remote/schema.d.ts +26 -0
- package/src/generators/remote/schema.json +167 -0
- package/src/generators/setup-ssr/files/server.ts__tmpl__ +28 -0
- package/src/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +47 -0
- package/src/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +15 -0
- package/src/generators/setup-ssr/schema.d.ts +7 -0
- package/src/generators/setup-ssr/schema.json +48 -0
- package/src/generators/setup-ssr/setup-ssr.d.ts +5 -0
- package/src/generators/setup-ssr/setup-ssr.js +162 -0
- package/src/generators/setup-ssr/setup-ssr.js.map +1 -0
- package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +15 -0
- package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +17 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +36 -0
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js.map +1 -0
- package/src/generators/setup-tailwind/lib/update-project.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/update-project.js +15 -0
- package/src/generators/setup-tailwind/lib/update-project.js.map +1 -0
- package/src/generators/setup-tailwind/schema.d.ts +6 -0
- package/src/generators/setup-tailwind/schema.js +3 -0
- package/src/generators/setup-tailwind/schema.js.map +1 -0
- package/src/generators/setup-tailwind/schema.json +47 -0
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +5 -0
- package/src/generators/setup-tailwind/setup-tailwind.js +39 -0
- package/src/generators/setup-tailwind/setup-tailwind.js.map +1 -0
- package/src/generators/stories/schema.json +59 -0
- package/src/generators/stories/stories.d.ts +15 -0
- package/src/generators/stories/stories.js +118 -0
- package/src/generators/stories/stories.js.map +1 -0
- package/src/generators/storybook-configuration/configuration.d.ts +5 -0
- package/src/generators/storybook-configuration/configuration.js +64 -0
- package/src/generators/storybook-configuration/configuration.js.map +1 -0
- package/src/generators/storybook-configuration/schema.d.ts +17 -0
- package/src/generators/storybook-configuration/schema.json +103 -0
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.d.ts +3 -0
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.js +13 -0
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.js.map +1 -0
- package/src/migrations/update-12-0-0/update-emotion-setup.d.ts +3 -0
- package/src/migrations/update-12-0-0/update-emotion-setup.js +67 -0
- package/src/migrations/update-12-0-0/update-emotion-setup.js.map +1 -0
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.d.ts +3 -0
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.js +27 -0
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.js.map +1 -0
- package/src/migrations/update-12-8-0/update-12-8-0.d.ts +3 -0
- package/src/migrations/update-12-8-0/update-12-8-0.js +15 -0
- package/src/migrations/update-12-8-0/update-12-8-0.js.map +1 -0
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.d.ts +3 -0
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.js +38 -0
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.js.map +1 -0
- package/src/migrations/update-13-0-0/update-emotion-setup.d.ts +3 -0
- package/src/migrations/update-13-0-0/update-emotion-setup.js +39 -0
- package/src/migrations/update-13-0-0/update-emotion-setup.js.map +1 -0
- package/src/migrations/update-13-0-0/webpack5-changes-utils.d.ts +11 -0
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js +269 -0
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js.map +1 -0
- package/src/migrations/update-13-10-0/update-13-10-0.d.ts +3 -0
- package/src/migrations/update-13-10-0/update-13-10-0.js +29 -0
- package/src/migrations/update-13-10-0/update-13-10-0.js.map +1 -0
- package/src/migrations/update-14-0-0/add-default-development-configurations.d.ts +3 -0
- package/src/migrations/update-14-0-0/add-default-development-configurations.js +40 -0
- package/src/migrations/update-14-0-0/add-default-development-configurations.js.map +1 -0
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.d.ts +3 -0
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.js +27 -0
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.js.map +1 -0
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.d.ts +5 -0
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js +69 -0
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js.map +1 -0
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.d.ts +3 -0
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js +38 -0
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js.map +1 -0
- package/src/migrations/update-14-6-0/add-preset-jest-config.d.ts +3 -0
- package/src/migrations/update-14-6-0/add-preset-jest-config.js +40 -0
- package/src/migrations/update-14-6-0/add-preset-jest-config.js.map +1 -0
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.d.ts +3 -0
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js +39 -0
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js.map +1 -0
- package/src/migrations/update-15-3-0/update-rollup-executor.d.ts +3 -0
- package/src/migrations/update-15-3-0/update-rollup-executor.js +17 -0
- package/src/migrations/update-15-3-0/update-rollup-executor.js.map +1 -0
- package/src/migrations/update-15-6-3/webpack-config-setup.d.ts +2 -0
- package/src/migrations/update-15-6-3/webpack-config-setup.js +108 -0
- package/src/migrations/update-15-6-3/webpack-config-setup.js.map +1 -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 +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/module-federation/ast-utils.d.ts +8 -0
- package/src/module-federation/ast-utils.js +103 -0
- package/src/module-federation/ast-utils.js.map +1 -0
- package/src/module-federation/load-config.d.ts +3 -0
- package/src/module-federation/load-config.js +17 -0
- package/src/module-federation/load-config.js.map +1 -0
- package/src/module-federation/models.d.ts +24 -0
- package/src/module-federation/models.js +3 -0
- package/src/module-federation/models.js.map +1 -0
- package/src/module-federation/package-json.d.ts +8 -0
- package/src/module-federation/package-json.js +14 -0
- package/src/module-federation/package-json.js.map +1 -0
- package/src/module-federation/utils.d.ts +10 -0
- package/src/module-federation/utils.js +38 -0
- package/src/module-federation/utils.js.map +1 -0
- package/src/module-federation/with-module-federation-ssr.d.ts +2 -0
- package/src/module-federation/with-module-federation-ssr.js +48 -0
- package/src/module-federation/with-module-federation-ssr.js.map +1 -0
- package/src/module-federation/with-module-federation.d.ts +7 -0
- package/src/module-federation/with-module-federation.js +50 -0
- package/src/module-federation/with-module-federation.js.map +1 -0
- package/src/rules/add-styled-dependencies.d.ts +2 -0
- package/src/rules/add-styled-dependencies.js +16 -0
- package/src/rules/add-styled-dependencies.js.map +1 -0
- package/src/rules/update-module-federation-project.d.ts +6 -0
- package/src/rules/update-module-federation-project.js +34 -0
- package/src/rules/update-module-federation-project.js.map +1 -0
- package/src/utils/assertion.d.ts +1 -0
- package/src/utils/assertion.js +20 -0
- package/src/utils/assertion.js.map +1 -0
- package/src/utils/ast-utils.d.ts +29 -0
- package/src/utils/ast-utils.js +526 -0
- package/src/utils/ast-utils.js.map +1 -0
- package/src/utils/component-props.d.ts +15 -0
- package/src/utils/component-props.js +61 -0
- package/src/utils/component-props.js.map +1 -0
- package/src/utils/create-ts-config.d.ts +9 -0
- package/src/utils/create-ts-config.js +64 -0
- package/src/utils/create-ts-config.js.map +1 -0
- package/src/utils/dependencies.d.ts +7 -0
- package/src/utils/dependencies.js +3 -0
- package/src/utils/dependencies.js.map +1 -0
- package/src/utils/format-file.d.ts +1 -0
- package/src/utils/format-file.js +13 -0
- package/src/utils/format-file.js.map +1 -0
- package/src/utils/get-in-source-vitest-tests-template.d.ts +1 -0
- package/src/utils/get-in-source-vitest-tests-template.js +22 -0
- package/src/utils/get-in-source-vitest-tests-template.js.map +1 -0
- package/src/utils/jest-utils.d.ts +1 -0
- package/src/utils/jest-utils.js +10 -0
- package/src/utils/jest-utils.js.map +1 -0
- package/src/utils/lint.d.ts +37 -0
- package/src/utils/lint.js +68 -0
- package/src/utils/lint.js.map +1 -0
- package/src/utils/styled.d.ts +4 -0
- package/src/utils/styled.js +33 -0
- package/src/utils/styled.js.map +1 -0
- package/src/utils/testing-generators.d.ts +3 -0
- package/src/utils/testing-generators.js +35 -0
- package/src/utils/testing-generators.js.map +1 -0
- package/src/utils/versions.d.ts +43 -0
- package/src/utils/versions.js +51 -0
- package/src/utils/versions.js.map +1 -0
- package/tailwind.d.ts +6 -0
- package/tailwind.js +30 -0
- package/tailwind.js.map +1 -0
- package/typings/cssmodule.d.ts +24 -0
- package/typings/image.d.ts +48 -0
- package/typings/style.d.ts +9 -0
- package/typings/styled-jsx.d.ts +8 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
|
|
2
|
+
|
|
3
|
+
<div style="text-align: center;">
|
|
4
|
+
|
|
5
|
+
[](https://circleci.com/gh/nrwl/nx)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://www.npmjs.com/@nrwl/workspace)
|
|
8
|
+
[]()
|
|
9
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
10
|
+
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
11
|
+
[](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<hr>
|
|
17
|
+
|
|
18
|
+
# Nx: Smart, Fast and Extensible Build System
|
|
19
|
+
|
|
20
|
+
Nx is a next generation build system with first class monorepo support and powerful integrations.
|
|
21
|
+
|
|
22
|
+
This package is a [React plugin for Nx](https://nx.dev/packages/react).
|
|
23
|
+
|
|
24
|
+
## Getting Started
|
|
25
|
+
|
|
26
|
+
### Creating an Nx Workspace
|
|
27
|
+
|
|
28
|
+
**Using `npx`**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx create-nx-workspace
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Using `npm init`**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm init nx-workspace
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Using `yarn create`**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yarn create nx-workspace
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
47
|
+
|
|
48
|
+
Run:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx nx@latest init
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Documentation & Resources
|
|
55
|
+
|
|
56
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
58
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
59
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
60
|
+
|
|
61
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
62
|
+
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
63
|
+
|
package/ast-utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { findMainRenderStatement, findComponentImportPath, findElements, findDefaultExport, findClosestOpening, isTag, } from './src/utils/ast-utils';
|
package/ast-utils.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTag = exports.findClosestOpening = exports.findDefaultExport = exports.findElements = exports.findComponentImportPath = exports.findMainRenderStatement = void 0;
|
|
4
|
+
// Exported schematics development outside of Nx. e.g. workspace schematics
|
|
5
|
+
var ast_utils_1 = require("./src/utils/ast-utils");
|
|
6
|
+
Object.defineProperty(exports, "findMainRenderStatement", { enumerable: true, get: function () { return ast_utils_1.findMainRenderStatement; } });
|
|
7
|
+
Object.defineProperty(exports, "findComponentImportPath", { enumerable: true, get: function () { return ast_utils_1.findComponentImportPath; } });
|
|
8
|
+
Object.defineProperty(exports, "findElements", { enumerable: true, get: function () { return ast_utils_1.findElements; } });
|
|
9
|
+
Object.defineProperty(exports, "findDefaultExport", { enumerable: true, get: function () { return ast_utils_1.findDefaultExport; } });
|
|
10
|
+
Object.defineProperty(exports, "findClosestOpening", { enumerable: true, get: function () { return ast_utils_1.findClosestOpening; } });
|
|
11
|
+
Object.defineProperty(exports, "isTag", { enumerable: true, get: function () { return ast_utils_1.isTag; } });
|
|
12
|
+
//# sourceMappingURL=ast-utils.js.map
|
package/ast-utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-utils.js","sourceRoot":"","sources":["../../../packages/react/ast-utils.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAC3E,mDAO+B;AAN7B,oHAAA,uBAAuB,OAAA;AACvB,oHAAA,uBAAuB,OAAA;AACvB,yGAAA,YAAY,OAAA;AACZ,8GAAA,iBAAiB,OAAA;AACjB,+GAAA,kBAAkB,OAAA;AAClB,kGAAA,KAAK,OAAA"}
|
package/babel.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface NxReactBabelOptions {
|
|
2
|
+
runtime?: string;
|
|
3
|
+
importSource?: string;
|
|
4
|
+
useBuiltIns?: boolean | string;
|
|
5
|
+
decorators?: {
|
|
6
|
+
decoratorsBeforeExport?: boolean;
|
|
7
|
+
legacy?: boolean;
|
|
8
|
+
};
|
|
9
|
+
classProperties?: {
|
|
10
|
+
loose?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function getReactPresetOptions({ presetOptions, env }: {
|
|
14
|
+
presetOptions: any;
|
|
15
|
+
env: any;
|
|
16
|
+
}): Record<string, string | boolean>;
|
package/babel.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Babel preset to provide React support for Nx.
|
|
3
|
+
*/
|
|
4
|
+
module.exports = function (api, options) {
|
|
5
|
+
api.assertVersion(7);
|
|
6
|
+
const env = api.env();
|
|
7
|
+
/**
|
|
8
|
+
* pagesDir is set when being transpiled by Next.js
|
|
9
|
+
*/
|
|
10
|
+
const isNextJs = api.caller((caller) => caller === null || caller === void 0 ? void 0 : caller.pagesDir);
|
|
11
|
+
const presets = [[require.resolve('@nx/js/babel'), options]];
|
|
12
|
+
/**
|
|
13
|
+
* Next.js already includes the preset-react, and including it
|
|
14
|
+
* the second time here results in having two instances of this preset.
|
|
15
|
+
*
|
|
16
|
+
* The plugin is duplicated as opposed to being merged because Next.js uses
|
|
17
|
+
* their own compiled version of the plugin, rather than one from node_modules.
|
|
18
|
+
* That affectively changes the "identity" of the plugin, and babel treats it as
|
|
19
|
+
* two separate instances.
|
|
20
|
+
*
|
|
21
|
+
* More on babel merging: https://babeljs.io/docs/en/options#merging
|
|
22
|
+
*/
|
|
23
|
+
if (!isNextJs) {
|
|
24
|
+
presets.push([
|
|
25
|
+
require.resolve('@babel/preset-react'),
|
|
26
|
+
getReactPresetOptions({
|
|
27
|
+
presetOptions: options,
|
|
28
|
+
env,
|
|
29
|
+
}),
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
presets,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
function getReactPresetOptions({ presetOptions, env }) {
|
|
37
|
+
var _a;
|
|
38
|
+
const reactPresetOptions = {
|
|
39
|
+
runtime: (_a = presetOptions.runtime) !== null && _a !== void 0 ? _a : 'automatic',
|
|
40
|
+
development: env !== 'production',
|
|
41
|
+
};
|
|
42
|
+
// JSX spread is transformed into object spread in `@babel/plugin-transform-react-jsx`
|
|
43
|
+
// `useBuiltIns` will be removed in Babel 8.
|
|
44
|
+
if (reactPresetOptions.runtime === 'automatic') {
|
|
45
|
+
reactPresetOptions.useBuiltIns = true;
|
|
46
|
+
}
|
|
47
|
+
if (presetOptions.importSource) {
|
|
48
|
+
reactPresetOptions.importSource = presetOptions.importSource;
|
|
49
|
+
}
|
|
50
|
+
return reactPresetOptions;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=babel.js.map
|
package/babel.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/react/babel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,MAAM,CAAC,OAAO,GAAG,UAAU,GAAQ,EAAE,OAA4B;IAC/D,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,CAAC;IAE1D,MAAM,OAAO,GAAU,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpE;;;;;;;;;;OAUG;IACH,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,IAAI,CAAC;YACX,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;YACtC,qBAAqB,CAAC;gBACpB,aAAa,EAAE,OAAO;gBACtB,GAAG;aACJ,CAAC;SACH,CAAC,CAAC;KACJ;IAED,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,qBAAqB,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE;;IACnD,MAAM,kBAAkB,GAAqC;QAC3D,OAAO,EAAE,MAAA,aAAa,CAAC,OAAO,mCAAI,WAAW;QAC7C,WAAW,EAAE,GAAG,KAAK,YAAY;KAClC,CAAC;IAEF,sFAAsF;IACtF,4CAA4C;IAC5C,IAAI,kBAAkB,CAAC,OAAO,KAAK,WAAW,EAAE;QAC9C,kBAAkB,CAAC,WAAW,GAAG,IAAI,CAAC;KACvC;IAED,IAAI,aAAa,CAAC,YAAY,EAAE;QAC9B,kBAAkB,CAAC,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC;KAC9D;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
|
package/executors.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"builders": {
|
|
3
|
+
"module-federation-dev-server": {
|
|
4
|
+
"implementation": "./src/executors/module-federation-dev-server/compat",
|
|
5
|
+
"schema": "./src/executors/module-federation-dev-server/schema.json",
|
|
6
|
+
"description": "Serve a host or remote application."
|
|
7
|
+
},
|
|
8
|
+
"module-federation-ssr-dev-server": {
|
|
9
|
+
"implementation": "./src/executors/module-federation-ssr-dev-server/compat",
|
|
10
|
+
"schema": "./src/executors/module-federation-ssr-dev-server/schema.json",
|
|
11
|
+
"description": "Serve a host application along with it's known remotes."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"executors": {
|
|
15
|
+
"module-federation-dev-server": {
|
|
16
|
+
"implementation": "./src/executors/module-federation-dev-server/module-federation-dev-server.impl",
|
|
17
|
+
"schema": "./src/executors/module-federation-dev-server/schema.json",
|
|
18
|
+
"description": "Serve a host or remote application."
|
|
19
|
+
},
|
|
20
|
+
"module-federation-ssr-dev-server": {
|
|
21
|
+
"implementation": "./src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl",
|
|
22
|
+
"schema": "./src/executors/module-federation-ssr-dev-server/schema.json",
|
|
23
|
+
"description": "Serve a host application along with it's known remotes."
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/generators.json
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Nx React",
|
|
3
|
+
"version": "0.1",
|
|
4
|
+
"extends": ["@nrwl/workspace"],
|
|
5
|
+
"schematics": {
|
|
6
|
+
"init": {
|
|
7
|
+
"factory": "./src/generators/init/init#reactInitSchematic",
|
|
8
|
+
"schema": "./src/generators/init/schema.json",
|
|
9
|
+
"description": "Initialize the `@nrwl/react` plugin.",
|
|
10
|
+
"aliases": ["ng-add"],
|
|
11
|
+
"hidden": true
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"application": {
|
|
15
|
+
"factory": "./src/generators/application/application#applicationSchematic",
|
|
16
|
+
"schema": "./src/generators/application/schema.json",
|
|
17
|
+
"aliases": ["app"],
|
|
18
|
+
"x-type": "application",
|
|
19
|
+
"description": "Create a React application."
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"library": {
|
|
23
|
+
"factory": "./src/generators/library/library#librarySchematic",
|
|
24
|
+
"schema": "./src/generators/library/schema.json",
|
|
25
|
+
"aliases": ["lib"],
|
|
26
|
+
"x-type": "library",
|
|
27
|
+
"description": "Create a React library."
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"component": {
|
|
31
|
+
"factory": "./src/generators/component/component#componentSchematic",
|
|
32
|
+
"schema": "./src/generators/component/schema.json",
|
|
33
|
+
"description": "Create a React component.",
|
|
34
|
+
"aliases": ["c"]
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
"redux": {
|
|
38
|
+
"factory": "./src/generators/redux/redux#reduxSchematic",
|
|
39
|
+
"schema": "./src/generators/redux/schema.json",
|
|
40
|
+
"description": "Create a Redux slice for a project.",
|
|
41
|
+
"aliases": ["slice"]
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
"storybook-configuration": {
|
|
45
|
+
"factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationSchematic",
|
|
46
|
+
"schema": "./src/generators/storybook-configuration/schema.json",
|
|
47
|
+
"description": "Set up storybook for a React app or library.",
|
|
48
|
+
"hidden": false
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
"component-story": {
|
|
52
|
+
"factory": "./src/generators/component-story/component-story#componentStorySchematic",
|
|
53
|
+
"schema": "./src/generators/component-story/schema.json",
|
|
54
|
+
"description": "Generate storybook story for a React component.",
|
|
55
|
+
"hidden": false
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
"stories": {
|
|
59
|
+
"factory": "./src/generators/stories/stories#storiesSchematic",
|
|
60
|
+
"schema": "./src/generators/stories/schema.json",
|
|
61
|
+
"description": "Create stories/specs for all components declared in an app or library.",
|
|
62
|
+
"hidden": false
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
"component-cypress-spec": {
|
|
66
|
+
"factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressSchematic",
|
|
67
|
+
"schema": "./src/generators/component-cypress-spec/schema.json",
|
|
68
|
+
"description": "Create a Cypress spec for a UI component that has a story.",
|
|
69
|
+
"hidden": false
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"hook": {
|
|
73
|
+
"factory": "./src/generators/hook/hook#hookSchematic",
|
|
74
|
+
"schema": "./src/generators/hook/schema.json",
|
|
75
|
+
"description": "Create a hook.",
|
|
76
|
+
"aliases": ["h"]
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
"cypress-component-configuration": {
|
|
80
|
+
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator",
|
|
81
|
+
"schema": "./src/generators/cypress-component-configuration/schema.json",
|
|
82
|
+
"description": "Setup Cypress component testing for a React project.",
|
|
83
|
+
"hidden": false
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
"component-test": {
|
|
87
|
+
"factory": "./src/generators/component-test/component-test#componentTestGenerator",
|
|
88
|
+
"schema": "./src/generators/component-test/schema.json",
|
|
89
|
+
"description": "Generate a Cypress component test for a React component.",
|
|
90
|
+
"hidden": false
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
"setup-tailwind": {
|
|
94
|
+
"factory": "./src/generators/setup-tailwind/setup-tailwind#setupTailwindSchematic",
|
|
95
|
+
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
96
|
+
"description": "Set up Tailwind configuration for a project.",
|
|
97
|
+
"hidden": false
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
"setup-ssr": {
|
|
101
|
+
"factory": "./src/generators/setup-ssr/setup-ssr#setupSsrSchematic",
|
|
102
|
+
"schema": "./src/generators/setup-ssr/schema.json",
|
|
103
|
+
"description": "Set up SSR configuration for a project.",
|
|
104
|
+
"hidden": false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"generators": {
|
|
108
|
+
"init": {
|
|
109
|
+
"factory": "./src/generators/init/init#reactInitGenerator",
|
|
110
|
+
"schema": "./src/generators/init/schema.json",
|
|
111
|
+
"description": "Initialize the `@nrwl/react` plugin.",
|
|
112
|
+
"aliases": ["ng-add"],
|
|
113
|
+
"hidden": true
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
"application": {
|
|
117
|
+
"factory": "./src/generators/application/application#applicationGenerator",
|
|
118
|
+
"schema": "./src/generators/application/schema.json",
|
|
119
|
+
"aliases": ["app"],
|
|
120
|
+
"x-type": "application",
|
|
121
|
+
"description": "Create a React application."
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
"library": {
|
|
125
|
+
"factory": "./src/generators/library/library#libraryGenerator",
|
|
126
|
+
"schema": "./src/generators/library/schema.json",
|
|
127
|
+
"aliases": ["lib"],
|
|
128
|
+
"x-type": "library",
|
|
129
|
+
"description": "Create a React library."
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
"component": {
|
|
133
|
+
"factory": "./src/generators/component/component#componentGenerator",
|
|
134
|
+
"schema": "./src/generators/component/schema.json",
|
|
135
|
+
"description": "Create a React component.",
|
|
136
|
+
"aliases": ["c"]
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
"redux": {
|
|
140
|
+
"factory": "./src/generators/redux/redux#reduxGenerator",
|
|
141
|
+
"schema": "./src/generators/redux/schema.json",
|
|
142
|
+
"description": "Create a Redux slice for a project.",
|
|
143
|
+
"aliases": ["slice"]
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
"storybook-configuration": {
|
|
147
|
+
"factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGenerator",
|
|
148
|
+
"schema": "./src/generators/storybook-configuration/schema.json",
|
|
149
|
+
"description": "Set up storybook for a React app or library.",
|
|
150
|
+
"hidden": false
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
"component-story": {
|
|
154
|
+
"factory": "./src/generators/component-story/component-story#componentStoryGenerator",
|
|
155
|
+
"schema": "./src/generators/component-story/schema.json",
|
|
156
|
+
"description": "Generate storybook story for a React component",
|
|
157
|
+
"hidden": false
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
"stories": {
|
|
161
|
+
"factory": "./src/generators/stories/stories#storiesGenerator",
|
|
162
|
+
"schema": "./src/generators/stories/schema.json",
|
|
163
|
+
"description": "Create stories/specs for all components declared in an app or library.",
|
|
164
|
+
"hidden": false
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
"component-cypress-spec": {
|
|
168
|
+
"factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator",
|
|
169
|
+
"schema": "./src/generators/component-cypress-spec/schema.json",
|
|
170
|
+
"description": "Create a Cypress spec for a UI component that has a story.",
|
|
171
|
+
"hidden": false
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
"hook": {
|
|
175
|
+
"factory": "./src/generators/hook/hook#hookGenerator",
|
|
176
|
+
"schema": "./src/generators/hook/schema.json",
|
|
177
|
+
"description": "Create a hook.",
|
|
178
|
+
"aliases": ["c"]
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
"host": {
|
|
182
|
+
"factory": "./src/generators/host/host#hostGenerator",
|
|
183
|
+
"schema": "./src/generators/host/schema.json",
|
|
184
|
+
"x-type": "application",
|
|
185
|
+
"description": "Generate a host react application"
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
"remote": {
|
|
189
|
+
"factory": "./src/generators/remote/remote#remoteGenerator",
|
|
190
|
+
"schema": "./src/generators/remote/schema.json",
|
|
191
|
+
"x-type": "application",
|
|
192
|
+
"description": "Generate a remote react application"
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
"cypress-component-configuration": {
|
|
196
|
+
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator",
|
|
197
|
+
"schema": "./src/generators/cypress-component-configuration/schema.json",
|
|
198
|
+
"description": "Setup Cypress component testing for a React project",
|
|
199
|
+
"hidden": false
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
"component-test": {
|
|
203
|
+
"factory": "./src/generators/component-test/component-test#componentTestGenerator",
|
|
204
|
+
"schema": "./src/generators/component-test/schema.json",
|
|
205
|
+
"description": "Generate a Cypress component test for a React component",
|
|
206
|
+
"hidden": false
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
"setup-tailwind": {
|
|
210
|
+
"factory": "./src/generators/setup-tailwind/setup-tailwind#setupTailwindGenerator",
|
|
211
|
+
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
212
|
+
"description": "Set up Tailwind configuration for a project.",
|
|
213
|
+
"hidden": false
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
"setup-ssr": {
|
|
217
|
+
"factory": "./src/generators/setup-ssr/setup-ssr#setupSsrGenerator",
|
|
218
|
+
"schema": "./src/generators/setup-ssr/schema.json",
|
|
219
|
+
"description": "Set up SSR configuration for a project.",
|
|
220
|
+
"hidden": false
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { extraEslintDependencies, createReactEslintJson, extendReactEslintJson, } from './src/utils/lint';
|
|
2
|
+
export { CSS_IN_JS_DEPENDENCIES } from './src/utils/styled';
|
|
3
|
+
export { assertValidStyle } from './src/utils/assertion';
|
|
4
|
+
export { reactDomVersion, reactVersion } from './src/utils/versions';
|
|
5
|
+
export { applicationGenerator } from './src/generators/application/application';
|
|
6
|
+
export { componentGenerator } from './src/generators/component/component';
|
|
7
|
+
export { hookGenerator } from './src/generators/hook/hook';
|
|
8
|
+
export { componentCypressGenerator } from './src/generators/component-cypress-spec/component-cypress-spec';
|
|
9
|
+
export { componentStoryGenerator } from './src/generators/component-story/component-story';
|
|
10
|
+
export { libraryGenerator } from './src/generators/library/library';
|
|
11
|
+
export { reactInitGenerator } from './src/generators/init/init';
|
|
12
|
+
export { reduxGenerator } from './src/generators/redux/redux';
|
|
13
|
+
export { storiesGenerator } from './src/generators/stories/stories';
|
|
14
|
+
export { storybookConfigurationGenerator } from './src/generators/storybook-configuration/configuration';
|
|
15
|
+
export { hostGenerator } from './src/generators/host/host';
|
|
16
|
+
export { remoteGenerator } from './src/generators/remote/remote';
|
|
17
|
+
export { cypressComponentConfigGenerator } from './src/generators/cypress-component-configuration/cypress-component-configuration';
|
|
18
|
+
export { componentTestGenerator } from './src/generators/component-test/component-test';
|
|
19
|
+
export { setupTailwindGenerator } from './src/generators/setup-tailwind/setup-tailwind';
|
|
20
|
+
export type { SupportedStyles } from './typings/style';
|
|
21
|
+
export * from './plugins/with-react';
|
package/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupTailwindGenerator = exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.remoteGenerator = exports.hostGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.componentCypressGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.CSS_IN_JS_DEPENDENCIES = exports.extendReactEslintJson = exports.createReactEslintJson = exports.extraEslintDependencies = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var lint_1 = require("./src/utils/lint");
|
|
6
|
+
Object.defineProperty(exports, "extraEslintDependencies", { enumerable: true, get: function () { return lint_1.extraEslintDependencies; } });
|
|
7
|
+
Object.defineProperty(exports, "createReactEslintJson", { enumerable: true, get: function () { return lint_1.createReactEslintJson; } });
|
|
8
|
+
Object.defineProperty(exports, "extendReactEslintJson", { enumerable: true, get: function () { return lint_1.extendReactEslintJson; } });
|
|
9
|
+
var styled_1 = require("./src/utils/styled");
|
|
10
|
+
Object.defineProperty(exports, "CSS_IN_JS_DEPENDENCIES", { enumerable: true, get: function () { return styled_1.CSS_IN_JS_DEPENDENCIES; } });
|
|
11
|
+
var assertion_1 = require("./src/utils/assertion");
|
|
12
|
+
Object.defineProperty(exports, "assertValidStyle", { enumerable: true, get: function () { return assertion_1.assertValidStyle; } });
|
|
13
|
+
var versions_1 = require("./src/utils/versions");
|
|
14
|
+
Object.defineProperty(exports, "reactDomVersion", { enumerable: true, get: function () { return versions_1.reactDomVersion; } });
|
|
15
|
+
Object.defineProperty(exports, "reactVersion", { enumerable: true, get: function () { return versions_1.reactVersion; } });
|
|
16
|
+
var application_1 = require("./src/generators/application/application");
|
|
17
|
+
Object.defineProperty(exports, "applicationGenerator", { enumerable: true, get: function () { return application_1.applicationGenerator; } });
|
|
18
|
+
var component_1 = require("./src/generators/component/component");
|
|
19
|
+
Object.defineProperty(exports, "componentGenerator", { enumerable: true, get: function () { return component_1.componentGenerator; } });
|
|
20
|
+
var hook_1 = require("./src/generators/hook/hook");
|
|
21
|
+
Object.defineProperty(exports, "hookGenerator", { enumerable: true, get: function () { return hook_1.hookGenerator; } });
|
|
22
|
+
var component_cypress_spec_1 = require("./src/generators/component-cypress-spec/component-cypress-spec");
|
|
23
|
+
Object.defineProperty(exports, "componentCypressGenerator", { enumerable: true, get: function () { return component_cypress_spec_1.componentCypressGenerator; } });
|
|
24
|
+
var component_story_1 = require("./src/generators/component-story/component-story");
|
|
25
|
+
Object.defineProperty(exports, "componentStoryGenerator", { enumerable: true, get: function () { return component_story_1.componentStoryGenerator; } });
|
|
26
|
+
var library_1 = require("./src/generators/library/library");
|
|
27
|
+
Object.defineProperty(exports, "libraryGenerator", { enumerable: true, get: function () { return library_1.libraryGenerator; } });
|
|
28
|
+
var init_1 = require("./src/generators/init/init");
|
|
29
|
+
Object.defineProperty(exports, "reactInitGenerator", { enumerable: true, get: function () { return init_1.reactInitGenerator; } });
|
|
30
|
+
var redux_1 = require("./src/generators/redux/redux");
|
|
31
|
+
Object.defineProperty(exports, "reduxGenerator", { enumerable: true, get: function () { return redux_1.reduxGenerator; } });
|
|
32
|
+
var stories_1 = require("./src/generators/stories/stories");
|
|
33
|
+
Object.defineProperty(exports, "storiesGenerator", { enumerable: true, get: function () { return stories_1.storiesGenerator; } });
|
|
34
|
+
var configuration_1 = require("./src/generators/storybook-configuration/configuration");
|
|
35
|
+
Object.defineProperty(exports, "storybookConfigurationGenerator", { enumerable: true, get: function () { return configuration_1.storybookConfigurationGenerator; } });
|
|
36
|
+
var host_1 = require("./src/generators/host/host");
|
|
37
|
+
Object.defineProperty(exports, "hostGenerator", { enumerable: true, get: function () { return host_1.hostGenerator; } });
|
|
38
|
+
var remote_1 = require("./src/generators/remote/remote");
|
|
39
|
+
Object.defineProperty(exports, "remoteGenerator", { enumerable: true, get: function () { return remote_1.remoteGenerator; } });
|
|
40
|
+
var cypress_component_configuration_1 = require("./src/generators/cypress-component-configuration/cypress-component-configuration");
|
|
41
|
+
Object.defineProperty(exports, "cypressComponentConfigGenerator", { enumerable: true, get: function () { return cypress_component_configuration_1.cypressComponentConfigGenerator; } });
|
|
42
|
+
var component_test_1 = require("./src/generators/component-test/component-test");
|
|
43
|
+
Object.defineProperty(exports, "componentTestGenerator", { enumerable: true, get: function () { return component_test_1.componentTestGenerator; } });
|
|
44
|
+
var setup_tailwind_1 = require("./src/generators/setup-tailwind/setup-tailwind");
|
|
45
|
+
Object.defineProperty(exports, "setupTailwindGenerator", { enumerable: true, get: function () { return setup_tailwind_1.setupTailwindGenerator; } });
|
|
46
|
+
tslib_1.__exportStar(require("./plugins/with-react"), exports);
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/react/index.ts"],"names":[],"mappings":";;;;AAAA,yCAI0B;AAHxB,+GAAA,uBAAuB,OAAA;AACvB,6GAAA,qBAAqB,OAAA;AACrB,6GAAA,qBAAqB,OAAA;AAEvB,6CAA4D;AAAnD,gHAAA,sBAAsB,OAAA;AAC/B,mDAAyD;AAAhD,6GAAA,gBAAgB,OAAA;AACzB,iDAAqE;AAA5D,2GAAA,eAAe,OAAA;AAAE,wGAAA,YAAY,OAAA;AACtC,wEAAgF;AAAvE,mHAAA,oBAAoB,OAAA;AAC7B,kEAA0E;AAAjE,+GAAA,kBAAkB,OAAA;AAC3B,mDAA2D;AAAlD,qGAAA,aAAa,OAAA;AACtB,yGAA2G;AAAlG,mIAAA,yBAAyB,OAAA;AAClC,oFAA2F;AAAlF,0HAAA,uBAAuB,OAAA;AAChC,4DAAoE;AAA3D,2GAAA,gBAAgB,OAAA;AACzB,mDAAgE;AAAvD,0GAAA,kBAAkB,OAAA;AAC3B,sDAA8D;AAArD,uGAAA,cAAc,OAAA;AACvB,4DAAoE;AAA3D,2GAAA,gBAAgB,OAAA;AACzB,wFAAyG;AAAhG,gIAAA,+BAA+B,OAAA;AACxC,mDAA2D;AAAlD,qGAAA,aAAa,OAAA;AACtB,yDAAiE;AAAxD,yGAAA,eAAe,OAAA;AACxB,oIAAmI;AAA1H,kJAAA,+BAA+B,OAAA;AACxC,iFAAwF;AAA/E,wHAAA,sBAAsB,OAAA;AAC/B,iFAAwF;AAA/E,wHAAA,sBAAsB,OAAA;AAE/B,+DAAqC"}
|