@nrwl/react 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/ast-utils.d.ts +1 -1
- package/ast-utils.js +2 -9
- package/ast-utils.js.map +1 -1
- package/babel.d.ts +0 -16
- package/babel.js +1 -51
- package/babel.js.map +1 -1
- package/executors.json +8 -8
- package/generators.json +2 -221
- package/index.d.ts +1 -21
- package/index.js +1 -43
- package/index.js.map +1 -1
- package/module-federation.d.ts +1 -4
- package/module-federation.js +2 -10
- package/module-federation.js.map +1 -1
- package/package.json +7 -16
- package/plugins/bundle-rollup.d.ts +0 -1
- package/plugins/bundle-rollup.js +1 -41
- package/plugins/bundle-rollup.js.map +1 -1
- package/plugins/component-testing/index.d.ts +1 -38
- package/plugins/component-testing/index.js +1 -118
- package/plugins/component-testing/index.js.map +1 -1
- package/plugins/jest.d.ts +0 -1
- package/plugins/jest.js +1 -61
- package/plugins/jest.js.map +1 -1
- package/plugins/storybook/index.d.ts +1 -3
- package/plugins/storybook/index.js +1 -73
- package/plugins/storybook/index.js.map +1 -1
- package/plugins/webpack.d.ts +1 -3
- package/plugins/webpack.js +2 -12
- package/plugins/webpack.js.map +1 -1
- package/plugins/with-react.d.ts +1 -12
- package/plugins/with-react.js +2 -79
- package/plugins/with-react.js.map +1 -1
- package/tailwind.d.ts +1 -6
- package/tailwind.js +2 -26
- package/tailwind.js.map +1 -1
- package/README.md +0 -63
- package/migrations.json +0 -864
- package/plugins/component-testing/webpack-fallback.d.ts +0 -5
- package/plugins/component-testing/webpack-fallback.js +0 -135
- package/plugins/component-testing/webpack-fallback.js.map +0 -1
- package/plugins/storybook/merge-plugins.d.ts +0 -3
- package/plugins/storybook/merge-plugins.js +0 -18
- package/plugins/storybook/merge-plugins.js.map +0 -1
- package/src/executors/module-federation-dev-server/compat.d.ts +0 -2
- package/src/executors/module-federation-dev-server/compat.js +0 -6
- package/src/executors/module-federation-dev-server/compat.js.map +0 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -11
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -55
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js.map +0 -1
- package/src/executors/module-federation-dev-server/schema.json +0 -96
- package/src/executors/module-federation-ssr-dev-server/compat.d.ts +0 -2
- package/src/executors/module-federation-ssr-dev-server/compat.js +0 -6
- package/src/executors/module-federation-ssr-dev-server/compat.js.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -9
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -71
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/schema.json +0 -48
- package/src/generators/application/application.d.ts +0 -5
- package/src/generators/application/application.js +0 -129
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/files/base-vite/index.html__tmpl__ +0 -16
- 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__ +0 -10
- 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__ +0 -3
- package/src/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +0 -6
- package/src/generators/application/files/base-vite/src/main.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +0 -14
- package/src/generators/application/files/base-webpack/.babelrc__tmpl__ +0 -13
- package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +0 -10
- 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__ +0 -3
- package/src/generators/application/files/base-webpack/src/environments/environment.ts__tmpl__ +0 -6
- package/src/generators/application/files/base-webpack/src/favicon.ico +0 -0
- package/src/generators/application/files/base-webpack/src/index.html +0 -14
- package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +0 -10
- package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +0 -14
- package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +0 -9
- package/src/generators/application/files/nx-welcome/src/app/nx-welcome.tsx +0 -845
- package/src/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +0 -1
- package/src/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +0 -37
- package/src/generators/application/files/style-css-module/src/styles.__style__ +0 -1
- package/src/generators/application/files/style-global-css/src/app/__fileName__.__style__ +0 -1
- package/src/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +0 -36
- package/src/generators/application/files/style-global-css/src/styles.__style__ +0 -1
- package/src/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +0 -35
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -29
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -40
- package/src/generators/application/lib/add-cypress.d.ts +0 -3
- package/src/generators/application/lib/add-cypress.js +0 -22
- package/src/generators/application/lib/add-cypress.js.map +0 -1
- package/src/generators/application/lib/add-jest.d.ts +0 -3
- package/src/generators/application/lib/add-jest.js +0 -17
- package/src/generators/application/lib/add-jest.js.map +0 -1
- package/src/generators/application/lib/add-project.d.ts +0 -2
- package/src/generators/application/lib/add-project.js +0 -98
- package/src/generators/application/lib/add-project.js.map +0 -1
- package/src/generators/application/lib/add-routing.d.ts +0 -3
- package/src/generators/application/lib/add-routing.js +0 -32
- package/src/generators/application/lib/add-routing.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 -47
- package/src/generators/application/lib/create-application-files.js.map +0 -1
- package/src/generators/application/lib/find-free-port.d.ts +0 -2
- package/src/generators/application/lib/find-free-port.js +0 -18
- package/src/generators/application/lib/find-free-port.js.map +0 -1
- package/src/generators/application/lib/get-app-tests.d.ts +0 -2
- package/src/generators/application/lib/get-app-tests.js +0 -22
- package/src/generators/application/lib/get-app-tests.js.map +0 -1
- package/src/generators/application/lib/install-common-dependencies.d.ts +0 -3
- package/src/generators/application/lib/install-common-dependencies.js +0 -29
- package/src/generators/application/lib/install-common-dependencies.js.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts +0 -5
- package/src/generators/application/lib/normalize-options.js +0 -60
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/lib/set-defaults.d.ts +0 -3
- package/src/generators/application/lib/set-defaults.js +0 -23
- package/src/generators/application/lib/set-defaults.js.map +0 -1
- package/src/generators/application/lib/update-jest-config.d.ts +0 -3
- package/src/generators/application/lib/update-jest-config.js +0 -30
- package/src/generators/application/lib/update-jest-config.js.map +0 -1
- package/src/generators/application/schema.d.ts +0 -45
- package/src/generators/application/schema.json +0 -202
- package/src/generators/component/component.d.ts +0 -5
- package/src/generators/component/component.js +0 -141
- package/src/generators/component/component.js.map +0 -1
- package/src/generators/component/files/__fileName__.__style__ +0 -0
- package/src/generators/component/files/__fileName__.module.__style__ +0 -7
- package/src/generators/component/files/__fileName__.spec.tsx__tmpl__ +0 -7
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +0 -71
- package/src/generators/component/get-component-tests.d.ts +0 -2
- package/src/generators/component/get-component-tests.js +0 -13
- package/src/generators/component/get-component-tests.js.map +0 -1
- package/src/generators/component/noramlized-schema.d.ts +0 -8
- package/src/generators/component/noramlized-schema.js +0 -3
- package/src/generators/component/noramlized-schema.js.map +0 -1
- package/src/generators/component/schema.d.ts +0 -20
- package/src/generators/component/schema.json +0 -153
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +0 -14
- package/src/generators/component-cypress-spec/component-cypress-spec.js +0 -105
- package/src/generators/component-cypress-spec/component-cypress-spec.js.map +0 -1
- package/src/generators/component-cypress-spec/files/__componentName__.__fileExt__ +0 -13
- package/src/generators/component-cypress-spec/schema.json +0 -44
- package/src/generators/component-story/component-story.d.ts +0 -12
- package/src/generators/component-story/component-story.js +0 -81
- package/src/generators/component-story/component-story.js.map +0 -1
- package/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +0 -32
- package/src/generators/component-story/schema.json +0 -36
- package/src/generators/component-test/component-test.d.ts +0 -4
- package/src/generators/component-test/component-test.js +0 -78
- package/src/generators/component-test/component-test.js.map +0 -1
- package/src/generators/component-test/files/__fileName__.cy__ext__ +0 -21
- package/src/generators/component-test/schema.d.ts +0 -4
- package/src/generators/component-test/schema.js +0 -3
- package/src/generators/component-test/schema.js.map +0 -1
- package/src/generators/component-test/schema.json +0 -31
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -9
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +0 -34
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js.map +0 -1
- package/src/generators/cypress-component-configuration/files/cypress/support/commands.ts__tpl__ +0 -42
- package/src/generators/cypress-component-configuration/files/cypress.config.ts__tpl__ +0 -8
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +0 -4
- package/src/generators/cypress-component-configuration/lib/add-files.js +0 -75
- package/src/generators/cypress-component-configuration/lib/add-files.js.map +0 -1
- package/src/generators/cypress-component-configuration/lib/update-configs.d.ts +0 -7
- package/src/generators/cypress-component-configuration/lib/update-configs.js +0 -30
- package/src/generators/cypress-component-configuration/lib/update-configs.js.map +0 -1
- package/src/generators/cypress-component-configuration/schema.d.ts +0 -7
- package/src/generators/cypress-component-configuration/schema.json +0 -54
- package/src/generators/hook/files/__fileName__.spec.tsx__tmpl__ +0 -18
- package/src/generators/hook/files/__fileName__.ts__tmpl__ +0 -15
- package/src/generators/hook/hook.d.ts +0 -5
- package/src/generators/hook/hook.js +0 -117
- package/src/generators/hook/hook.js.map +0 -1
- package/src/generators/hook/schema.d.ts +0 -11
- package/src/generators/hook/schema.json +0 -77
- package/src/generators/host/files/common/src/app/__fileName__.tsx__tmpl__ +0 -33
- package/src/generators/host/files/module-federation/module-federation.config.js__tmpl__ +0 -6
- package/src/generators/host/files/module-federation/src/main.ts__tmpl__ +0 -1
- package/src/generators/host/files/module-federation/src/remotes.d.ts__tmpl__ +0 -4
- package/src/generators/host/files/module-federation/webpack.config.js__tmpl__ +0 -12
- package/src/generators/host/files/module-federation/webpack.config.prod.js__tmpl__ +0 -32
- package/src/generators/host/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -13
- package/src/generators/host/files/module-federation-ssr/server.ts__tmpl__ +0 -28
- package/src/generators/host/files/module-federation-ssr/tsconfig.server.json__tmpl__ +0 -15
- package/src/generators/host/files/module-federation-ssr/webpack.server.config.js__tmpl__ +0 -12
- package/src/generators/host/host.d.ts +0 -4
- package/src/generators/host/host.js +0 -67
- package/src/generators/host/host.js.map +0 -1
- package/src/generators/host/lib/add-module-federation-files.d.ts +0 -5
- package/src/generators/host/lib/add-module-federation-files.js +0 -21
- package/src/generators/host/lib/add-module-federation-files.js.map +0 -1
- package/src/generators/host/lib/setup-ssr-for-host.d.ts +0 -6
- package/src/generators/host/lib/setup-ssr-for-host.js +0 -27
- package/src/generators/host/lib/setup-ssr-for-host.js.map +0 -1
- package/src/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -3
- package/src/generators/host/lib/update-module-federation-e2e-project.js +0 -16
- package/src/generators/host/lib/update-module-federation-e2e-project.js.map +0 -1
- package/src/generators/host/schema.d.ts +0 -32
- package/src/generators/host/schema.json +0 -174
- package/src/generators/init/init.d.ts +0 -5
- package/src/generators/init/init.js +0 -80
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/schema.d.ts +0 -11
- package/src/generators/init/schema.json +0 -49
- package/src/generators/library/files/common/.babelrc__tmpl__ +0 -16
- package/src/generators/library/files/common/README.md +0 -7
- package/src/generators/library/files/common/package.json__tmpl__ +0 -4
- package/src/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -14
- package/src/generators/library/files/vite/README.md +0 -7
- package/src/generators/library/files/vite/package.json__tmpl__ +0 -12
- package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -14
- package/src/generators/library/lib/add-linting.d.ts +0 -3
- package/src/generators/library/lib/add-linting.js +0 -38
- package/src/generators/library/lib/add-linting.js.map +0 -1
- package/src/generators/library/lib/add-rollup-build-target.d.ts +0 -3
- package/src/generators/library/lib/add-rollup-build-target.js +0 -59
- package/src/generators/library/lib/add-rollup-build-target.js.map +0 -1
- package/src/generators/library/lib/create-files.d.ts +0 -3
- package/src/generators/library/lib/create-files.js +0 -26
- package/src/generators/library/lib/create-files.js.map +0 -1
- package/src/generators/library/lib/install-common-dependencies.d.ts +0 -3
- package/src/generators/library/lib/install-common-dependencies.js +0 -30
- package/src/generators/library/lib/install-common-dependencies.js.map +0 -1
- package/src/generators/library/lib/maybe-js.d.ts +0 -2
- package/src/generators/library/lib/maybe-js.js +0 -10
- package/src/generators/library/lib/maybe-js.js.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts +0 -3
- package/src/generators/library/lib/normalize-options.js +0 -57
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/lib/set-defaults.d.ts +0 -3
- package/src/generators/library/lib/set-defaults.js +0 -16
- package/src/generators/library/lib/set-defaults.js.map +0 -1
- package/src/generators/library/lib/update-app-routes.d.ts +0 -3
- package/src/generators/library/lib/update-app-routes.js +0 -63
- package/src/generators/library/lib/update-app-routes.js.map +0 -1
- package/src/generators/library/library.d.ts +0 -5
- package/src/generators/library/library.js +0 -126
- package/src/generators/library/library.js.map +0 -1
- package/src/generators/library/schema.d.ts +0 -44
- package/src/generators/library/schema.json +0 -198
- package/src/generators/redux/files/__directory__/__fileName__.slice.spec.ts__tmpl__ +0 -53
- package/src/generators/redux/files/__directory__/__fileName__.slice.ts__tmpl__ +0 -129
- package/src/generators/redux/redux.d.ts +0 -5
- package/src/generators/redux/redux.js +0 -117
- package/src/generators/redux/redux.js.map +0 -1
- package/src/generators/redux/schema.d.ts +0 -20
- package/src/generators/redux/schema.json +0 -47
- package/src/generators/remote/files/module-federation/module-federation.config.js__tmpl__ +0 -6
- package/src/generators/remote/files/module-federation/src/main.ts__tmpl__ +0 -1
- package/src/generators/remote/files/module-federation/src/remote-entry.ts__tmpl__ +0 -1
- package/src/generators/remote/files/module-federation/webpack.config.js__tmpl__ +0 -12
- package/src/generators/remote/files/module-federation/webpack.config.prod.js__tmpl__ +0 -1
- package/src/generators/remote/files/module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -6
- package/src/generators/remote/files/module-federation-ssr/server.ts__tmpl__ +0 -45
- package/src/generators/remote/files/module-federation-ssr/webpack.server.config.js__tmpl__ +0 -12
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -4
- package/src/generators/remote/lib/setup-ssr-for-remote.js +0 -32
- package/src/generators/remote/lib/setup-ssr-for-remote.js.map +0 -1
- package/src/generators/remote/lib/update-host-with-remote.d.ts +0 -2
- package/src/generators/remote/lib/update-host-with-remote.js +0 -53
- package/src/generators/remote/lib/update-host-with-remote.js.map +0 -1
- package/src/generators/remote/remote.d.ts +0 -6
- package/src/generators/remote/remote.js +0 -56
- package/src/generators/remote/remote.js.map +0 -1
- package/src/generators/remote/schema.d.ts +0 -27
- package/src/generators/remote/schema.json +0 -173
- package/src/generators/setup-ssr/files/server.ts__tmpl__ +0 -28
- package/src/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -47
- package/src/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -15
- package/src/generators/setup-ssr/schema.d.ts +0 -7
- package/src/generators/setup-ssr/schema.json +0 -48
- package/src/generators/setup-ssr/setup-ssr.d.ts +0 -5
- package/src/generators/setup-ssr/setup-ssr.js +0 -162
- package/src/generators/setup-ssr/setup-ssr.js.map +0 -1
- package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
- package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -17
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -3
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -36
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js.map +0 -1
- package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -3
- package/src/generators/setup-tailwind/lib/update-project.js +0 -15
- package/src/generators/setup-tailwind/lib/update-project.js.map +0 -1
- package/src/generators/setup-tailwind/schema.d.ts +0 -6
- package/src/generators/setup-tailwind/schema.js +0 -3
- package/src/generators/setup-tailwind/schema.js.map +0 -1
- package/src/generators/setup-tailwind/schema.json +0 -47
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
- package/src/generators/setup-tailwind/setup-tailwind.js +0 -39
- package/src/generators/setup-tailwind/setup-tailwind.js.map +0 -1
- package/src/generators/stories/schema.json +0 -59
- package/src/generators/stories/stories.d.ts +0 -15
- package/src/generators/stories/stories.js +0 -118
- 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 -65
- package/src/generators/storybook-configuration/configuration.js.map +0 -1
- package/src/generators/storybook-configuration/schema.d.ts +0 -18
- package/src/generators/storybook-configuration/schema.json +0 -109
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.d.ts +0 -3
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.js +0 -13
- package/src/migrations/update-12-0-0/remove-react-redux-types-package.js.map +0 -1
- package/src/migrations/update-12-0-0/update-emotion-setup.d.ts +0 -3
- package/src/migrations/update-12-0-0/update-emotion-setup.js +0 -67
- package/src/migrations/update-12-0-0/update-emotion-setup.js.map +0 -1
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.d.ts +0 -3
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.js +0 -27
- package/src/migrations/update-12-0-0/use-react-jsx-in-tsconfig.js.map +0 -1
- package/src/migrations/update-12-8-0/update-12-8-0.d.ts +0 -3
- package/src/migrations/update-12-8-0/update-12-8-0.js +0 -15
- package/src/migrations/update-12-8-0/update-12-8-0.js.map +0 -1
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.d.ts +0 -3
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.js +0 -38
- package/src/migrations/update-13-0-0/migrate-storybook-to-webpack-5.js.map +0 -1
- package/src/migrations/update-13-0-0/update-emotion-setup.d.ts +0 -3
- package/src/migrations/update-13-0-0/update-emotion-setup.js +0 -39
- package/src/migrations/update-13-0-0/update-emotion-setup.js.map +0 -1
- package/src/migrations/update-13-0-0/webpack5-changes-utils.d.ts +0 -11
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js +0 -269
- package/src/migrations/update-13-0-0/webpack5-changes-utils.js.map +0 -1
- package/src/migrations/update-13-10-0/update-13-10-0.d.ts +0 -3
- package/src/migrations/update-13-10-0/update-13-10-0.js +0 -29
- package/src/migrations/update-13-10-0/update-13-10-0.js.map +0 -1
- package/src/migrations/update-14-0-0/add-default-development-configurations.d.ts +0 -3
- package/src/migrations/update-14-0-0/add-default-development-configurations.js +0 -40
- package/src/migrations/update-14-0-0/add-default-development-configurations.js.map +0 -1
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.d.ts +0 -3
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.js +0 -27
- package/src/migrations/update-14-0-0/replace-testing-library-react-hook.js.map +0 -1
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.d.ts +0 -5
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js +0 -69
- package/src/migrations/update-14-0-0/update-react-dom-render-for-v18.js.map +0 -1
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.d.ts +0 -3
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js +0 -38
- package/src/migrations/update-14-1-0/update-external-emotion-jsx-runtime.js.map +0 -1
- package/src/migrations/update-14-6-0/add-preset-jest-config.d.ts +0 -3
- package/src/migrations/update-14-6-0/add-preset-jest-config.js +0 -40
- package/src/migrations/update-14-6-0/add-preset-jest-config.js.map +0 -1
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.d.ts +0 -3
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js +0 -39
- package/src/migrations/update-15-3-0/install-webpack-rollup-dependencies.js.map +0 -1
- package/src/migrations/update-15-3-0/update-rollup-executor.d.ts +0 -3
- package/src/migrations/update-15-3-0/update-rollup-executor.js +0 -17
- package/src/migrations/update-15-3-0/update-rollup-executor.js.map +0 -1
- package/src/migrations/update-15-6-3/webpack-config-setup.d.ts +0 -2
- package/src/migrations/update-15-6-3/webpack-config-setup.js +0 -108
- package/src/migrations/update-15-6-3/webpack-config-setup.js.map +0 -1
- package/src/module-federation/ast-utils.d.ts +0 -8
- package/src/module-federation/ast-utils.js +0 -103
- package/src/module-federation/ast-utils.js.map +0 -1
- package/src/module-federation/load-config.d.ts +0 -3
- package/src/module-federation/load-config.js +0 -17
- package/src/module-federation/load-config.js.map +0 -1
- package/src/module-federation/models.d.ts +0 -24
- package/src/module-federation/models.js +0 -3
- package/src/module-federation/models.js.map +0 -1
- package/src/module-federation/package-json.d.ts +0 -8
- package/src/module-federation/package-json.js +0 -14
- package/src/module-federation/package-json.js.map +0 -1
- package/src/module-federation/utils.d.ts +0 -10
- package/src/module-federation/utils.js +0 -38
- package/src/module-federation/utils.js.map +0 -1
- package/src/module-federation/with-module-federation-ssr.d.ts +0 -2
- package/src/module-federation/with-module-federation-ssr.js +0 -48
- package/src/module-federation/with-module-federation-ssr.js.map +0 -1
- package/src/module-federation/with-module-federation.d.ts +0 -7
- package/src/module-federation/with-module-federation.js +0 -50
- package/src/module-federation/with-module-federation.js.map +0 -1
- package/src/rules/add-styled-dependencies.d.ts +0 -2
- package/src/rules/add-styled-dependencies.js +0 -16
- package/src/rules/add-styled-dependencies.js.map +0 -1
- package/src/rules/update-module-federation-project.d.ts +0 -6
- package/src/rules/update-module-federation-project.js +0 -34
- package/src/rules/update-module-federation-project.js.map +0 -1
- package/src/utils/assertion.d.ts +0 -1
- package/src/utils/assertion.js +0 -20
- package/src/utils/assertion.js.map +0 -1
- package/src/utils/ast-utils.d.ts +0 -29
- package/src/utils/ast-utils.js +0 -526
- package/src/utils/ast-utils.js.map +0 -1
- package/src/utils/component-props.d.ts +0 -15
- package/src/utils/component-props.js +0 -61
- package/src/utils/component-props.js.map +0 -1
- package/src/utils/create-ts-config.d.ts +0 -9
- package/src/utils/create-ts-config.js +0 -64
- package/src/utils/create-ts-config.js.map +0 -1
- package/src/utils/dependencies.d.ts +0 -7
- package/src/utils/dependencies.js +0 -3
- package/src/utils/dependencies.js.map +0 -1
- package/src/utils/format-file.d.ts +0 -1
- package/src/utils/format-file.js +0 -13
- package/src/utils/format-file.js.map +0 -1
- package/src/utils/get-in-source-vitest-tests-template.d.ts +0 -1
- package/src/utils/get-in-source-vitest-tests-template.js +0 -22
- package/src/utils/get-in-source-vitest-tests-template.js.map +0 -1
- package/src/utils/jest-utils.d.ts +0 -1
- package/src/utils/jest-utils.js +0 -10
- package/src/utils/jest-utils.js.map +0 -1
- package/src/utils/lint.d.ts +0 -37
- package/src/utils/lint.js +0 -68
- package/src/utils/lint.js.map +0 -1
- package/src/utils/styled.d.ts +0 -4
- package/src/utils/styled.js +0 -33
- package/src/utils/styled.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 -43
- package/src/utils/versions.js +0 -51
- package/src/utils/versions.js.map +0 -1
|
@@ -1,122 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nxComponentTestingPreset = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
|
-
|
|
6
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
7
|
-
const ct_helpers_1 = require("@nrwl/cypress/src/utils/ct-helpers");
|
|
8
|
-
/**
|
|
9
|
-
* React nx preset for Cypress Component Testing
|
|
10
|
-
*
|
|
11
|
-
* This preset contains the base configuration
|
|
12
|
-
* for your component tests that nx recommends.
|
|
13
|
-
* including a devServer that supports nx workspaces.
|
|
14
|
-
* you can easily extend this within your cypress config via spreading the preset
|
|
15
|
-
* @example
|
|
16
|
-
* export default defineConfig({
|
|
17
|
-
* component: {
|
|
18
|
-
* ...nxComponentTestingPreset(__dirname)
|
|
19
|
-
* // add your own config here
|
|
20
|
-
* }
|
|
21
|
-
* })
|
|
22
|
-
*
|
|
23
|
-
* @param pathToConfig will be used for loading project options and to construct the output paths for videos and screenshots
|
|
24
|
-
* @param options override options
|
|
25
|
-
*/
|
|
26
|
-
function nxComponentTestingPreset(pathToConfig, options) {
|
|
27
|
-
if ((options === null || options === void 0 ? void 0 : options.bundler) === 'vite') {
|
|
28
|
-
return Object.assign(Object.assign({}, (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig)), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign({}, { framework: 'react', bundler: 'vite' }) });
|
|
29
|
-
}
|
|
30
|
-
let webpackConfig;
|
|
31
|
-
try {
|
|
32
|
-
const graph = (0, devkit_1.readCachedProjectGraph)();
|
|
33
|
-
const { targets: ctTargets, name: ctProjectName } = (0, ct_helpers_1.getProjectConfigByPath)(graph, pathToConfig);
|
|
34
|
-
const ctTargetName = (options === null || options === void 0 ? void 0 : options.ctTargetName) || 'component-test';
|
|
35
|
-
const ctConfigurationName = process.env.NX_CYPRESS_TARGET_CONFIGURATION;
|
|
36
|
-
const ctExecutorContext = (0, ct_helpers_1.createExecutorContext)(graph, ctTargets, ctProjectName, ctTargetName, ctConfigurationName);
|
|
37
|
-
const ctExecutorOptions = (0, devkit_1.readTargetOptions)({
|
|
38
|
-
project: ctProjectName,
|
|
39
|
-
target: ctTargetName,
|
|
40
|
-
configuration: ctConfigurationName,
|
|
41
|
-
}, ctExecutorContext);
|
|
42
|
-
const buildTarget = ctExecutorOptions.devServerTarget;
|
|
43
|
-
if (!buildTarget) {
|
|
44
|
-
throw new Error(`Unable to find the 'devServerTarget' executor option in the '${ctTargetName}' target of the '${ctProjectName}' project`);
|
|
45
|
-
}
|
|
46
|
-
webpackConfig = buildTargetWebpack(graph, buildTarget, ctProjectName);
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
devkit_1.logger.warn((0, devkit_1.stripIndents) `Unable to build a webpack config with the project graph.
|
|
50
|
-
Falling back to default webpack config.`);
|
|
51
|
-
devkit_1.logger.warn(e);
|
|
52
|
-
const { buildBaseWebpackConfig } = require('./webpack-fallback');
|
|
53
|
-
webpackConfig = buildBaseWebpackConfig({
|
|
54
|
-
tsConfigPath: 'cypress/tsconfig.cy.json',
|
|
55
|
-
compiler: 'babel',
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return Object.assign(Object.assign({}, (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig)), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign(Object.assign({}, { framework: 'react', bundler: 'webpack' }), { webpackConfig }) });
|
|
59
|
-
}
|
|
60
|
-
exports.nxComponentTestingPreset = nxComponentTestingPreset;
|
|
61
|
-
/**
|
|
62
|
-
* apply the schema.json defaults from the @nrwl/web:webpack executor to the target options
|
|
63
|
-
*/
|
|
64
|
-
function withSchemaDefaults(target, context) {
|
|
65
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
66
|
-
const options = (0, devkit_1.readTargetOptions)(target, context);
|
|
67
|
-
(_a = options.compiler) !== null && _a !== void 0 ? _a : (options.compiler = 'babel');
|
|
68
|
-
(_b = options.deleteOutputPath) !== null && _b !== void 0 ? _b : (options.deleteOutputPath = true);
|
|
69
|
-
(_c = options.vendorChunk) !== null && _c !== void 0 ? _c : (options.vendorChunk = true);
|
|
70
|
-
(_d = options.commonChunk) !== null && _d !== void 0 ? _d : (options.commonChunk = true);
|
|
71
|
-
(_e = options.runtimeChunk) !== null && _e !== void 0 ? _e : (options.runtimeChunk = true);
|
|
72
|
-
(_f = options.sourceMap) !== null && _f !== void 0 ? _f : (options.sourceMap = true);
|
|
73
|
-
(_g = options.assets) !== null && _g !== void 0 ? _g : (options.assets = []);
|
|
74
|
-
(_h = options.scripts) !== null && _h !== void 0 ? _h : (options.scripts = []);
|
|
75
|
-
(_j = options.styles) !== null && _j !== void 0 ? _j : (options.styles = []);
|
|
76
|
-
(_k = options.budgets) !== null && _k !== void 0 ? _k : (options.budgets = []);
|
|
77
|
-
(_l = options.namedChunks) !== null && _l !== void 0 ? _l : (options.namedChunks = true);
|
|
78
|
-
(_m = options.outputHashing) !== null && _m !== void 0 ? _m : (options.outputHashing = 'none');
|
|
79
|
-
(_o = options.extractCss) !== null && _o !== void 0 ? _o : (options.extractCss = true);
|
|
80
|
-
(_p = options.memoryLimit) !== null && _p !== void 0 ? _p : (options.memoryLimit = 2048);
|
|
81
|
-
(_q = options.maxWorkers) !== null && _q !== void 0 ? _q : (options.maxWorkers = 2);
|
|
82
|
-
(_r = options.fileReplacements) !== null && _r !== void 0 ? _r : (options.fileReplacements = []);
|
|
83
|
-
(_s = options.buildLibsFromSource) !== null && _s !== void 0 ? _s : (options.buildLibsFromSource = true);
|
|
84
|
-
(_t = options.generateIndexHtml) !== null && _t !== void 0 ? _t : (options.generateIndexHtml = true);
|
|
85
|
-
return options;
|
|
86
|
-
}
|
|
87
|
-
function buildTargetWebpack(graph, buildTarget, componentTestingProjectName) {
|
|
88
|
-
var _a, _b;
|
|
89
|
-
const parsed = (0, devkit_1.parseTargetString)(buildTarget, graph);
|
|
90
|
-
const buildableProjectConfig = (_a = graph.nodes[parsed.project]) === null || _a === void 0 ? void 0 : _a.data;
|
|
91
|
-
const ctProjectConfig = (_b = graph.nodes[componentTestingProjectName]) === null || _b === void 0 ? void 0 : _b.data;
|
|
92
|
-
if (!buildableProjectConfig || !ctProjectConfig) {
|
|
93
|
-
throw new Error((0, devkit_1.stripIndents) `Unable to load project configs from graph.
|
|
94
|
-
Using build target '${buildTarget}'
|
|
95
|
-
Has build config? ${!!buildableProjectConfig}
|
|
96
|
-
Has component config? ${!!ctProjectConfig}
|
|
97
|
-
`);
|
|
98
|
-
}
|
|
99
|
-
const context = (0, ct_helpers_1.createExecutorContext)(graph, buildableProjectConfig.targets, parsed.project, parsed.target, parsed.target);
|
|
100
|
-
const { normalizeOptions, } = require('@nrwl/webpack/src/executors/webpack/lib/normalize-options');
|
|
101
|
-
const { resolveCustomWebpackConfig, } = require('@nrwl/webpack/src/utils/webpack/custom-webpack');
|
|
102
|
-
const { getWebpackConfig, } = require('@nrwl/webpack/src/executors/webpack/lib/get-webpack-config');
|
|
103
|
-
const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, buildableProjectConfig.sourceRoot);
|
|
104
|
-
if (options.webpackConfig) {
|
|
105
|
-
let customWebpack;
|
|
106
|
-
customWebpack = resolveCustomWebpackConfig(options.webpackConfig, options.tsConfig);
|
|
107
|
-
return () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
customWebpack = yield customWebpack;
|
|
109
|
-
// TODO(jack): Once webpackConfig is always set in @nrwl/webpack:webpack, we no longer need this default.
|
|
110
|
-
const defaultWebpack = getWebpackConfig(context, Object.assign(Object.assign({}, options), { root: devkit_1.workspaceRoot, projectRoot: ctProjectConfig.root, sourceRoot: ctProjectConfig.sourceRoot }));
|
|
111
|
-
if (customWebpack) {
|
|
112
|
-
return yield customWebpack(defaultWebpack, {
|
|
113
|
-
options,
|
|
114
|
-
context,
|
|
115
|
-
configuration: parsed.configuration,
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
return defaultWebpack;
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
4
|
+
tslib_1.__exportStar(require("@nx/react/plugins/component-testing"), exports);
|
|
122
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/react/plugins/component-testing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages-legacy/react/plugins/component-testing/index.ts"],"names":[],"mappings":";;;AAAA,8EAAoD"}
|
package/plugins/jest.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/plugins/jest.js
CHANGED
|
@@ -1,62 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const JS_SOURCE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'];
|
|
6
|
-
module.exports = {
|
|
7
|
-
process(src, filename, options) {
|
|
8
|
-
var _a, _b;
|
|
9
|
-
const assetFilename = JSON.stringify(path.basename(filename));
|
|
10
|
-
if (filename.match(/\.svg$/)) {
|
|
11
|
-
// Based on how SVGR generates a component name:
|
|
12
|
-
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
|
|
13
|
-
const pascalCaseFilename = (0, devkit_1.names)(path.parse(filename).name).className;
|
|
14
|
-
const componentName = `Svg${pascalCaseFilename}`;
|
|
15
|
-
return {
|
|
16
|
-
code: `const React = require('react');
|
|
17
|
-
module.exports = {
|
|
18
|
-
__esModule: true,
|
|
19
|
-
default: ${assetFilename},
|
|
20
|
-
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
|
|
21
|
-
return {
|
|
22
|
-
$$typeof: Symbol.for('react.element'),
|
|
23
|
-
type: 'svg',
|
|
24
|
-
ref: ref,
|
|
25
|
-
key: null,
|
|
26
|
-
props: Object.assign({}, props, {
|
|
27
|
-
children: ${assetFilename}
|
|
28
|
-
})
|
|
29
|
-
};
|
|
30
|
-
}),
|
|
31
|
-
};`,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
if (JS_SOURCE_EXTENSIONS.includes(path.extname(filename))) {
|
|
35
|
-
const transformer = getJsTransform((_b = (_a = options.config) === null || _a === void 0 ? void 0 : _a.transform) !== null && _b !== void 0 ? _b : []);
|
|
36
|
-
if (transformer)
|
|
37
|
-
return transformer.process(src, filename, options);
|
|
38
|
-
}
|
|
39
|
-
// Fallback for unknown extensions
|
|
40
|
-
return {
|
|
41
|
-
code: `module.exports = ${assetFilename};`,
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
function getJsTransform(transformers) {
|
|
46
|
-
var _a;
|
|
47
|
-
try {
|
|
48
|
-
if ((_a = transformers === null || transformers === void 0 ? void 0 : transformers[1]) === null || _a === void 0 ? void 0 : _a.includes('@swc/jest')) {
|
|
49
|
-
return require('@swc/jest').createTransformer();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
catch (_b) {
|
|
53
|
-
// ignored
|
|
54
|
-
}
|
|
55
|
-
try {
|
|
56
|
-
return require('babel-jest').default.createTransformer();
|
|
57
|
-
}
|
|
58
|
-
catch (_c) {
|
|
59
|
-
// ignored
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
module.exports = require('@nx/react/plugins/jest');
|
|
62
2
|
//# sourceMappingURL=jest.js.map
|
package/plugins/jest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.js","sourceRoot":"","sources":["../../../../packages/react/plugins/jest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jest.js","sourceRoot":"","sources":["../../../../packages-legacy/react/plugins/jest.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,77 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webpack = exports.core = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
|
-
|
|
6
|
-
const config_1 = require("@nrwl/webpack/src/utils/config");
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
const webpack_1 = require("webpack");
|
|
9
|
-
const merge_plugins_1 = require("./merge-plugins");
|
|
10
|
-
const with_react_1 = require("../with-react");
|
|
11
|
-
// This is shamelessly taken from CRA and modified for NX use
|
|
12
|
-
// https://github.com/facebook/create-react-app/blob/4784997f0682e75eb32a897b4ffe34d735912e6c/packages/react-scripts/config/env.js#L71
|
|
13
|
-
function getClientEnvironment(mode) {
|
|
14
|
-
// Grab NODE_ENV and NX_* and STORYBOOK_* environment variables and prepare them to be
|
|
15
|
-
// injected into the application via DefinePlugin in webpack configuration.
|
|
16
|
-
const NX_PREFIX = /^NX_/i;
|
|
17
|
-
const STORYBOOK_PREFIX = /^STORYBOOK_/i;
|
|
18
|
-
const raw = Object.keys(process.env)
|
|
19
|
-
.filter((key) => NX_PREFIX.test(key) || STORYBOOK_PREFIX.test(key))
|
|
20
|
-
.reduce((env, key) => {
|
|
21
|
-
env[key] = process.env[key];
|
|
22
|
-
return env;
|
|
23
|
-
}, {
|
|
24
|
-
// Useful for determining whether we’re running in production mode.
|
|
25
|
-
NODE_ENV: process.env.NODE_ENV || mode,
|
|
26
|
-
// Environment variables for Storybook
|
|
27
|
-
// https://github.com/storybookjs/storybook/blob/bdf9e5ed854b8d34e737eee1a4a05add88265e92/lib/core-common/src/utils/envs.ts#L12-L21
|
|
28
|
-
NODE_PATH: process.env.NODE_PATH || '',
|
|
29
|
-
STORYBOOK: process.env.STORYBOOK || 'true',
|
|
30
|
-
// This is to support CRA's public folder feature.
|
|
31
|
-
// In production we set this to dot(.) to allow the browser to access these assets
|
|
32
|
-
// even when deployed inside a subpath. (like in GitHub pages)
|
|
33
|
-
// In development this is just empty as we always serves from the root.
|
|
34
|
-
PUBLIC_URL: mode === 'production' ? '.' : '',
|
|
35
|
-
});
|
|
36
|
-
// Stringify all values so we can feed into webpack DefinePlugin
|
|
37
|
-
const stringified = {
|
|
38
|
-
'process.env': Object.keys(raw).reduce((env, key) => {
|
|
39
|
-
env[key] = JSON.stringify(raw[key]);
|
|
40
|
-
return env;
|
|
41
|
-
}, {}),
|
|
42
|
-
};
|
|
43
|
-
return { stringified };
|
|
44
|
-
}
|
|
45
|
-
const core = (prev, options) => (Object.assign(Object.assign({}, prev), { disableWebpackDefaults: true }));
|
|
46
|
-
exports.core = core;
|
|
47
|
-
const webpack = (storybookWebpackConfig = {}, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
-
var _a, _b, _c, _d, _e;
|
|
49
|
-
devkit_1.logger.info('=> Loading Nx React Storybook Addon from "@nrwl/react/plugins/storybook"');
|
|
50
|
-
// In case anyone is missing dep and did not run migrations.
|
|
51
|
-
// See: https://github.com/nrwl/nx/issues/14455
|
|
52
|
-
try {
|
|
53
|
-
require.resolve('@nrwl/webpack');
|
|
54
|
-
}
|
|
55
|
-
catch (_f) {
|
|
56
|
-
throw new Error(`'@nrwl/webpack' package is not installed. Install it and try again.`);
|
|
57
|
-
}
|
|
58
|
-
const { withNx, withWeb } = require('@nrwl/webpack');
|
|
59
|
-
const tsconfigPath = (0, path_1.join)(options.configDir, 'tsconfig.json');
|
|
60
|
-
const builderOptions = Object.assign(Object.assign({}, options), { root: options.configDir,
|
|
61
|
-
// These are blank because root is the absolute path to .storybook folder
|
|
62
|
-
projectRoot: '', sourceRoot: '', fileReplacements: [], sourceMap: true, styles: (_a = options.styles) !== null && _a !== void 0 ? _a : [], optimization: {}, tsConfig: tsconfigPath, extractCss: storybookWebpackConfig.mode === 'production', target: 'web' });
|
|
63
|
-
// ESM build for modern browsers.
|
|
64
|
-
let baseWebpackConfig = {};
|
|
65
|
-
const configure = (0, config_1.composePluginsSync)(withNx({ skipTypeChecking: true }), withWeb(), (0, with_react_1.withReact)());
|
|
66
|
-
const finalConfig = configure(baseWebpackConfig, {
|
|
67
|
-
options: builderOptions,
|
|
68
|
-
context: { root: devkit_1.workspaceRoot }, // The context is not used here.
|
|
69
|
-
});
|
|
70
|
-
return Object.assign(Object.assign({}, storybookWebpackConfig), { module: Object.assign(Object.assign({}, storybookWebpackConfig.module), { rules: [
|
|
71
|
-
...storybookWebpackConfig.module.rules,
|
|
72
|
-
...finalConfig.module.rules,
|
|
73
|
-
] }), resolve: Object.assign(Object.assign({}, storybookWebpackConfig.resolve), { plugins: (0, merge_plugins_1.mergePlugins)(...((_b = storybookWebpackConfig.resolve.plugins) !== null && _b !== void 0 ? _b : []), ...((_c = finalConfig.resolve
|
|
74
|
-
.plugins) !== null && _c !== void 0 ? _c : [])) }), plugins: (0, merge_plugins_1.mergePlugins)(new webpack_1.DefinePlugin(getClientEnvironment(storybookWebpackConfig.mode).stringified), ...((_d = storybookWebpackConfig.plugins) !== null && _d !== void 0 ? _d : []), ...((_e = finalConfig.plugins) !== null && _e !== void 0 ? _e : [])) });
|
|
75
|
-
});
|
|
76
|
-
exports.webpack = webpack;
|
|
4
|
+
tslib_1.__exportStar(require("@nx/react/plugins/storybook"), exports);
|
|
77
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/react/plugins/storybook/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages-legacy/react/plugins/storybook/index.ts"],"names":[],"mappings":";;;AAAA,sEAA4C"}
|
package/plugins/webpack.d.ts
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const getWebpackConfig: (config: import("webpack").Configuration, context: import("../../../build/packages/webpack").NxWebpackExecutionContext) => import("webpack").Configuration;
|
|
3
|
-
export { getWebpackConfig };
|
|
1
|
+
export * from '@nx/react/plugins/webpack';
|
package/plugins/webpack.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// Support existing default exports as well as new named export.
|
|
6
|
-
const legacyExport = (0, with_react_1.withReact)();
|
|
7
|
-
legacyExport.withReact = with_react_1.withReact;
|
|
8
|
-
/** @deprecated use `import { withReact } from '@nrwl/react'` */
|
|
9
|
-
// This is here for backward compatibility if anyone imports {getWebpackConfig} directly.
|
|
10
|
-
// TODO(jack): Remove in Nx 16
|
|
11
|
-
const getWebpackConfig = (0, with_react_1.withReact)();
|
|
12
|
-
exports.getWebpackConfig = getWebpackConfig;
|
|
13
|
-
legacyExport.getWebpackConfig = getWebpackConfig;
|
|
14
|
-
module.exports = legacyExport;
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("@nx/react/plugins/webpack"), exports);
|
|
15
5
|
//# sourceMappingURL=webpack.js.map
|
package/plugins/webpack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.js","sourceRoot":"","sources":["../../../../packages/react/plugins/webpack.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"webpack.js","sourceRoot":"","sources":["../../../../packages-legacy/react/plugins/webpack.ts"],"names":[],"mappings":";;;AAAA,oEAA0C"}
|
package/plugins/with-react.d.ts
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { WithWebOptions } from '@nrwl/webpack';
|
|
3
|
-
import type { NxWebpackExecutionContext } from '@nrwl/webpack';
|
|
4
|
-
interface WithReactOptions extends WithWebOptions {
|
|
5
|
-
svgr?: false;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @param {WithReactOptions} pluginOptions
|
|
9
|
-
* @returns {NxWebpackPlugin}
|
|
10
|
-
*/
|
|
11
|
-
export declare function withReact(pluginOptions?: WithReactOptions): (config: Configuration, context: NxWebpackExecutionContext) => Configuration;
|
|
12
|
-
export {};
|
|
1
|
+
export * from '@nx/react/plugins/with-react';
|
package/plugins/with-react.js
CHANGED
|
@@ -1,82 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function addHotReload(config) {
|
|
6
|
-
var _a;
|
|
7
|
-
if (config.mode === 'development' && ((_a = config['devServer']) === null || _a === void 0 ? void 0 : _a.hot)) {
|
|
8
|
-
// add `react-refresh/babel` to babel loader plugin
|
|
9
|
-
const babelLoader = config.module.rules.find((rule) => {
|
|
10
|
-
var _a;
|
|
11
|
-
return typeof rule !== 'string' &&
|
|
12
|
-
((_a = rule.loader) === null || _a === void 0 ? void 0 : _a.toString().includes('babel-loader'));
|
|
13
|
-
});
|
|
14
|
-
if (babelLoader && typeof babelLoader !== 'string') {
|
|
15
|
-
babelLoader.options['plugins'] = [
|
|
16
|
-
...(babelLoader.options['plugins'] || []),
|
|
17
|
-
[
|
|
18
|
-
require.resolve('react-refresh/babel'),
|
|
19
|
-
{
|
|
20
|
-
skipEnvCheck: true,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
];
|
|
24
|
-
}
|
|
25
|
-
const ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
26
|
-
config.plugins.push(new ReactRefreshPlugin());
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
// We remove potentially conflicting rules that target SVGs because we use @svgr/webpack loader
|
|
30
|
-
// See https://github.com/nrwl/nx/issues/14383
|
|
31
|
-
function removeSvgLoaderIfPresent(config) {
|
|
32
|
-
const svgLoaderIdx = config.module.rules.findIndex((rule) => typeof rule === 'object' && rule.test.toString().includes('svg'));
|
|
33
|
-
if (svgLoaderIdx === -1)
|
|
34
|
-
return;
|
|
35
|
-
config.module.rules.splice(svgLoaderIdx, 1);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @param {WithReactOptions} pluginOptions
|
|
39
|
-
* @returns {NxWebpackPlugin}
|
|
40
|
-
*/
|
|
41
|
-
function withReact(pluginOptions = {}) {
|
|
42
|
-
return function configure(config, context) {
|
|
43
|
-
const { withWeb } = require('@nrwl/webpack');
|
|
44
|
-
if (processed.has(config))
|
|
45
|
-
return config;
|
|
46
|
-
// Apply web config for CSS, JSX, index.html handling, etc.
|
|
47
|
-
config = withWeb(pluginOptions)(config, context);
|
|
48
|
-
addHotReload(config);
|
|
49
|
-
if ((pluginOptions === null || pluginOptions === void 0 ? void 0 : pluginOptions.svgr) !== false) {
|
|
50
|
-
removeSvgLoaderIfPresent(config);
|
|
51
|
-
config.module.rules.push({
|
|
52
|
-
test: /\.svg$/,
|
|
53
|
-
issuer: /\.(js|ts|md)x?$/,
|
|
54
|
-
use: [
|
|
55
|
-
{
|
|
56
|
-
loader: require.resolve('@svgr/webpack'),
|
|
57
|
-
options: {
|
|
58
|
-
svgo: false,
|
|
59
|
-
titleProp: true,
|
|
60
|
-
ref: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
loader: require.resolve('file-loader'),
|
|
65
|
-
options: {
|
|
66
|
-
name: '[name].[hash].[ext]',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
// enable webpack node api
|
|
73
|
-
config.node = {
|
|
74
|
-
__dirname: true,
|
|
75
|
-
__filename: true,
|
|
76
|
-
};
|
|
77
|
-
processed.add(config);
|
|
78
|
-
return config;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
exports.withReact = withReact;
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("@nx/react/plugins/with-react"), exports);
|
|
82
5
|
//# sourceMappingURL=with-react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-react.js","sourceRoot":"","sources":["../../../../packages/react/plugins/with-react.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"with-react.js","sourceRoot":"","sources":["../../../../packages-legacy/react/plugins/with-react.ts"],"names":[],"mappings":";;;AAAA,uEAA6C"}
|
package/tailwind.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Generates a set of glob patterns based off the source root of the app and its dependencies
|
|
3
|
-
* @param dirPath workspace relative directory path that will be used to infer the parent project and dependencies
|
|
4
|
-
* @param fileGlobPattern pass a custom glob pattern to be used
|
|
5
|
-
*/
|
|
6
|
-
export declare function createGlobPatternsForDependencies(dirPath: string, fileGlobPattern?: string): string[];
|
|
1
|
+
export * from '@nx/react/tailwind';
|
package/tailwind.js
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generates a set of glob patterns based off the source root of the app and its dependencies
|
|
7
|
-
* @param dirPath workspace relative directory path that will be used to infer the parent project and dependencies
|
|
8
|
-
* @param fileGlobPattern pass a custom glob pattern to be used
|
|
9
|
-
*/
|
|
10
|
-
function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.stories|*.spec).{tsx,jsx,js,html}') {
|
|
11
|
-
try {
|
|
12
|
-
return (0, generate_globs_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
|
|
13
|
-
}
|
|
14
|
-
catch (_a) {
|
|
15
|
-
/**
|
|
16
|
-
* It should not be possible to reach this point when the utility is invoked as part of the normal
|
|
17
|
-
* lifecycle of Nx executors. However, other tooling, such as the VSCode Tailwind IntelliSense plugin
|
|
18
|
-
* or JetBrains editors such as WebStorm, may execute the tailwind.config.js file in order to provide
|
|
19
|
-
* autocomplete features, for example.
|
|
20
|
-
*
|
|
21
|
-
* In order to best support that use-case, we therefore do not hard error when the ProjectGraph is
|
|
22
|
-
* fundamently unavailable in this tailwind-specific context.
|
|
23
|
-
*/
|
|
24
|
-
console.warn('\n[createGlobPatternsForDependencies] WARNING: There was no ProjectGraph available to read from, returning an empty array of glob patterns\n');
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("@nx/react/tailwind"), exports);
|
|
29
5
|
//# sourceMappingURL=tailwind.js.map
|
package/tailwind.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.js","sourceRoot":"","sources":["../../../packages/react/tailwind.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"tailwind.js","sourceRoot":"","sources":["../../../packages-legacy/react/tailwind.ts"],"names":[],"mappings":";;;AAAA,6DAAmC"}
|
package/README.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
|