@nx/react 0.0.0-pr-22179-271588f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +68 -0
- package/ast-utils.d.ts +1 -0
- package/ast-utils.js +11 -0
- package/babel.d.ts +20 -0
- package/babel.js +50 -0
- package/executors.json +14 -0
- package/generators.json +112 -0
- package/index.d.ts +22 -0
- package/index.js +47 -0
- package/mf/dynamic-federation.d.ts +4 -0
- package/mf/dynamic-federation.js +75 -0
- package/mf/index.d.ts +1 -0
- package/mf/index.js +7 -0
- package/migrations.json +310 -0
- package/module-federation.d.ts +4 -0
- package/module-federation.js +12 -0
- package/package.json +49 -0
- package/plugins/bundle-rollup.d.ts +1 -0
- package/plugins/bundle-rollup.js +47 -0
- package/plugins/component-testing/index.d.ts +37 -0
- package/plugins/component-testing/index.js +222 -0
- package/plugins/component-testing/webpack-fallback.d.ts +5 -0
- package/plugins/component-testing/webpack-fallback.js +125 -0
- package/plugins/jest.d.ts +1 -0
- package/plugins/jest.js +59 -0
- package/plugins/nx-react-webpack-plugin/lib/apply-react-config.d.ts +4 -0
- package/plugins/nx-react-webpack-plugin/lib/apply-react-config.js +60 -0
- package/plugins/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts +8 -0
- package/plugins/nx-react-webpack-plugin/nx-react-webpack-plugin.js +13 -0
- package/plugins/storybook/index.d.ts +3 -0
- package/plugins/storybook/index.js +174 -0
- package/plugins/storybook/merge-plugins.d.ts +3 -0
- package/plugins/storybook/merge-plugins.js +17 -0
- package/plugins/webpack.d.ts +1 -0
- package/plugins/webpack.js +6 -0
- package/plugins/with-react.d.ts +10 -0
- package/plugins/with-react.js +22 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +25 -0
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +211 -0
- package/src/executors/module-federation-dev-server/schema.json +114 -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 +106 -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 +232 -0
- package/src/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-rspack/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/base-rspack/src/favicon.ico +0 -0
- package/src/generators/application/files/base-rspack/src/index.html +14 -0
- package/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ +10 -0
- package/src/generators/application/files/base-rspack/tsconfig.app.json__tmpl__ +14 -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/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/favicon.ico +0 -0
- package/src/generators/application/files/base-webpack/src/index.html +12 -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__ +50 -0
- package/src/generators/application/files/nx-welcome/src/app/nx-welcome.tsx +886 -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__ +36 -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__ +35 -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__ +34 -0
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +37 -0
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +40 -0
- package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +33 -0
- package/src/generators/application/files/style-tailwind/src/styles.css +1 -0
- package/src/generators/application/lib/add-e2e.d.ts +3 -0
- package/src/generators/application/lib/add-e2e.js +79 -0
- package/src/generators/application/lib/add-jest.d.ts +3 -0
- package/src/generators/application/lib/add-jest.js +21 -0
- package/src/generators/application/lib/add-project.d.ts +3 -0
- package/src/generators/application/lib/add-project.js +96 -0
- package/src/generators/application/lib/add-routing.d.ts +3 -0
- package/src/generators/application/lib/add-routing.js +27 -0
- package/src/generators/application/lib/create-application-files.d.ts +3 -0
- package/src/generators/application/lib/create-application-files.js +143 -0
- package/src/generators/application/lib/find-free-port.d.ts +2 -0
- package/src/generators/application/lib/find-free-port.js +16 -0
- package/src/generators/application/lib/get-app-tests.d.ts +2 -0
- package/src/generators/application/lib/get-app-tests.js +21 -0
- package/src/generators/application/lib/install-common-dependencies.d.ts +3 -0
- package/src/generators/application/lib/install-common-dependencies.js +47 -0
- package/src/generators/application/lib/normalize-options.d.ts +5 -0
- package/src/generators/application/lib/normalize-options.js +72 -0
- package/src/generators/application/lib/set-defaults.d.ts +3 -0
- package/src/generators/application/lib/set-defaults.js +43 -0
- package/src/generators/application/lib/show-possible-warnings.d.ts +3 -0
- package/src/generators/application/lib/show-possible-warnings.js +11 -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/schema.d.ts +45 -0
- package/src/generators/application/schema.json +201 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +93 -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__ +88 -0
- package/src/generators/component/lib/get-component-tests.d.ts +2 -0
- package/src/generators/component/lib/get-component-tests.js +12 -0
- package/src/generators/component/lib/normalize-options.d.ts +3 -0
- package/src/generators/component/lib/normalize-options.js +50 -0
- package/src/generators/component/schema.d.ts +48 -0
- package/src/generators/component/schema.json +150 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +13 -0
- package/src/generators/component-cypress-spec/component-cypress-spec.js +100 -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 +72 -0
- package/src/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +29 -0
- package/src/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +36 -0
- package/src/generators/component-story/schema.json +42 -0
- package/src/generators/component-test/component-test.d.ts +4 -0
- package/src/generators/component-test/component-test.js +76 -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 +2 -0
- package/src/generators/component-test/schema.json +31 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +10 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +51 -0
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +4 -0
- package/src/generators/cypress-component-configuration/lib/add-files.js +45 -0
- package/src/generators/cypress-component-configuration/schema.d.ts +8 -0
- package/src/generators/cypress-component-configuration/schema.json +54 -0
- package/src/generators/federate-module/federate-module.d.ts +4 -0
- package/src/generators/federate-module/federate-module.js +70 -0
- package/src/generators/federate-module/lib/utils.d.ts +23 -0
- package/src/generators/federate-module/lib/utils.js +100 -0
- package/src/generators/federate-module/schema.d.ts +13 -0
- package/src/generators/federate-module/schema.json +83 -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 +131 -0
- package/src/generators/hook/schema.d.ts +24 -0
- package/src/generators/hook/schema.json +84 -0
- package/src/generators/host/files/common/src/app/__fileName__.js__tmpl__ +33 -0
- package/src/generators/host/files/common/src/main.js__tmpl__ +10 -0
- package/src/generators/host/files/common/tsconfig.lint.json__tmpl__ +19 -0
- package/src/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +41 -0
- package/src/generators/host/files/common-ts/src/main.ts__tmpl__ +10 -0
- package/src/generators/host/files/module-federation/module-federation.config.js__tmpl__ +21 -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__ +16 -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__ +17 -0
- package/src/generators/host/files/module-federation-ssr/webpack.server.config.js__tmpl__ +12 -0
- package/src/generators/host/files/module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +13 -0
- package/src/generators/host/files/module-federation-ssr-ts/server.ts__tmpl__ +28 -0
- package/src/generators/host/files/module-federation-ssr-ts/tsconfig.server.json__tmpl__ +17 -0
- package/src/generators/host/files/module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +12 -0
- package/src/generators/host/files/module-federation-ts/module-federation.config.ts__tmpl__ +25 -0
- package/src/generators/host/files/module-federation-ts/webpack.config.prod.ts__tmpl__ +33 -0
- package/src/generators/host/files/module-federation-ts/webpack.config.ts__tmpl__ +12 -0
- package/src/generators/host/host.d.ts +5 -0
- package/src/generators/host/host.js +95 -0
- package/src/generators/host/lib/add-module-federation-files.d.ts +6 -0
- package/src/generators/host/lib/add-module-federation-files.js +52 -0
- package/src/generators/host/lib/normalize-remote.d.ts +4 -0
- package/src/generators/host/lib/normalize-remote.js +28 -0
- package/src/generators/host/lib/setup-ssr-for-host.d.ts +6 -0
- package/src/generators/host/lib/setup-ssr-for-host.js +33 -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 +20 -0
- package/src/generators/host/schema.d.ts +37 -0
- package/src/generators/host/schema.json +184 -0
- package/src/generators/init/init.d.ts +4 -0
- package/src/generators/init/init.js +23 -0
- package/src/generators/init/schema.d.ts +5 -0
- package/src/generators/init/schema.json +27 -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 +36 -0
- package/src/generators/library/lib/add-rollup-build-target.d.ts +4 -0
- package/src/generators/library/lib/add-rollup-build-target.js +59 -0
- package/src/generators/library/lib/create-files.d.ts +3 -0
- package/src/generators/library/lib/create-files.js +53 -0
- package/src/generators/library/lib/install-common-dependencies.d.ts +3 -0
- package/src/generators/library/lib/install-common-dependencies.js +47 -0
- package/src/generators/library/lib/normalize-options.d.ts +3 -0
- package/src/generators/library/lib/normalize-options.js +92 -0
- package/src/generators/library/lib/set-defaults.d.ts +3 -0
- package/src/generators/library/lib/set-defaults.js +23 -0
- package/src/generators/library/lib/update-app-routes.d.ts +3 -0
- package/src/generators/library/lib/update-app-routes.js +62 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +193 -0
- package/src/generators/library/schema.d.ts +45 -0
- package/src/generators/library/schema.json +198 -0
- package/src/generators/redux/files/__fileName__.slice.spec.ts__tmpl__ +56 -0
- package/src/generators/redux/files/__fileName__.slice.ts__tmpl__ +129 -0
- package/src/generators/redux/redux.d.ts +5 -0
- package/src/generators/redux/redux.js +143 -0
- package/src/generators/redux/schema.d.ts +23 -0
- package/src/generators/redux/schema.json +51 -0
- package/src/generators/remote/files/common/src/main.js__tmpl__ +1 -0
- package/src/generators/remote/files/common/src/remote-entry.js__tmpl__ +1 -0
- package/src/generators/remote/files/common-ts/src/main.ts__tmpl__ +1 -0
- package/src/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +1 -0
- package/src/generators/remote/files/module-federation/module-federation.config.js__tmpl__ +9 -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/files/module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +10 -0
- package/src/generators/remote/files/module-federation-ssr-ts/server.ts__tmpl__ +45 -0
- package/src/generators/remote/files/module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +19 -0
- package/src/generators/remote/files/module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +12 -0
- package/src/generators/remote/files/module-federation-ts/module-federation.config.ts__tmpl__ +13 -0
- package/src/generators/remote/files/module-federation-ts/tsconfig.lint.json__tmpl__ +19 -0
- package/src/generators/remote/files/module-federation-ts/webpack.config.prod.ts__tmpl__ +1 -0
- package/src/generators/remote/files/module-federation-ts/webpack.config.ts__tmpl__ +12 -0
- package/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts +2 -0
- package/src/generators/remote/lib/add-remote-to-dynamic-host.js +11 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts +4 -0
- package/src/generators/remote/lib/setup-ssr-for-remote.js +40 -0
- package/src/generators/remote/lib/setup-tspath-for-remote.d.ts +3 -0
- package/src/generators/remote/lib/setup-tspath-for-remote.js +15 -0
- package/src/generators/remote/lib/update-host-with-remote.d.ts +2 -0
- package/src/generators/remote/lib/update-host-with-remote.js +64 -0
- package/src/generators/remote/remote.d.ts +7 -0
- package/src/generators/remote/remote.js +104 -0
- package/src/generators/remote/schema.d.ts +34 -0
- package/src/generators/remote/schema.json +183 -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__ +17 -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 +4 -0
- package/src/generators/setup-ssr/setup-ssr.js +183 -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/update-project.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/update-project.js +13 -0
- package/src/generators/setup-tailwind/schema.d.ts +6 -0
- package/src/generators/setup-tailwind/schema.js +2 -0
- package/src/generators/setup-tailwind/schema.json +47 -0
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +4 -0
- package/src/generators/setup-tailwind/setup-tailwind.js +35 -0
- package/src/generators/stories/schema.json +67 -0
- package/src/generators/stories/stories.d.ts +15 -0
- package/src/generators/stories/stories.js +130 -0
- package/src/generators/storybook-configuration/configuration.d.ts +6 -0
- package/src/generators/storybook-configuration/configuration.js +74 -0
- package/src/generators/storybook-configuration/schema.d.ts +16 -0
- package/src/generators/storybook-configuration/schema.json +95 -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 +37 -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 +15 -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 +103 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
- package/src/migrations/update-16-2-0-remove-package/update-16-2-0-remove-package.d.ts +2 -0
- package/src/migrations/update-16-2-0-remove-package/update-16-2-0-remove-package.js +8 -0
- package/src/migrations/update-16-3-0/remove-types-react-router-dom-package.d.ts +2 -0
- package/src/migrations/update-16-3-0/remove-types-react-router-dom-package.js +8 -0
- package/src/migrations/update-16-7-0/add-babel-core.d.ts +2 -0
- package/src/migrations/update-16-7-0/add-babel-core.js +14 -0
- package/src/migrations/update-16-7-0-add-typings/update-16-7-0-add-typings.d.ts +2 -0
- package/src/migrations/update-16-7-0-add-typings/update-16-7-0-add-typings.js +57 -0
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +2 -0
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +26 -0
- package/src/module-federation/ast-utils.d.ts +8 -0
- package/src/module-federation/ast-utils.js +102 -0
- package/src/module-federation/load-config.d.ts +3 -0
- package/src/module-federation/load-config.js +16 -0
- package/src/module-federation/models.d.ts +24 -0
- package/src/module-federation/models.js +2 -0
- package/src/module-federation/package-json.d.ts +8 -0
- package/src/module-federation/package-json.js +13 -0
- package/src/module-federation/utils.d.ts +12 -0
- package/src/module-federation/utils.js +76 -0
- package/src/module-federation/with-module-federation-ssr.d.ts +2 -0
- package/src/module-federation/with-module-federation-ssr.js +34 -0
- package/src/module-federation/with-module-federation.d.ts +7 -0
- package/src/module-federation/with-module-federation.js +50 -0
- package/src/rules/add-styled-dependencies.d.ts +5 -0
- package/src/rules/add-styled-dependencies.js +17 -0
- package/src/rules/update-module-federation-project.d.ts +9 -0
- package/src/rules/update-module-federation-project.js +50 -0
- package/src/utils/add-mf-env-to-inputs.d.ts +2 -0
- package/src/utils/add-mf-env-to-inputs.js +24 -0
- package/src/utils/assertion.d.ts +1 -0
- package/src/utils/assertion.js +19 -0
- package/src/utils/ast-utils.d.ts +29 -0
- package/src/utils/ast-utils.js +522 -0
- package/src/utils/component-props.d.ts +15 -0
- package/src/utils/component-props.js +60 -0
- package/src/utils/create-ts-config.d.ts +9 -0
- package/src/utils/create-ts-config.js +65 -0
- package/src/utils/ct-utils.d.ts +14 -0
- package/src/utils/ct-utils.js +94 -0
- package/src/utils/dependencies.d.ts +7 -0
- package/src/utils/dependencies.js +2 -0
- package/src/utils/format-file.d.ts +1 -0
- package/src/utils/format-file.js +12 -0
- package/src/utils/get-in-source-vitest-tests-template.d.ts +1 -0
- package/src/utils/get-in-source-vitest-tests-template.js +21 -0
- package/src/utils/has-vite-plugin.d.ts +2 -0
- package/src/utils/has-vite-plugin.js +11 -0
- package/src/utils/has-webpack-plugin.d.ts +2 -0
- package/src/utils/has-webpack-plugin.js +11 -0
- package/src/utils/jest-utils.d.ts +1 -0
- package/src/utils/jest-utils.js +9 -0
- package/src/utils/lint.d.ts +36 -0
- package/src/utils/lint.js +24 -0
- package/src/utils/maybe-js.d.ts +3 -0
- package/src/utils/maybe-js.js +9 -0
- package/src/utils/styled.d.ts +3 -0
- package/src/utils/styled.js +62 -0
- package/src/utils/testing-generators.d.ts +3 -0
- package/src/utils/testing-generators.js +30 -0
- package/src/utils/versions.d.ts +46 -0
- package/src/utils/versions.js +54 -0
- package/tailwind.d.ts +6 -0
- package/tailwind.js +29 -0
- package/typings/cssmodule.d.ts +19 -0
- package/typings/image.d.ts +48 -0
- package/typings/style.d.ts +9 -0
- package/typings/styled-jsx.d.ts +8 -0
package/tailwind.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
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[];
|
package/tailwind.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createGlobPatternsForDependencies = void 0;
|
|
4
|
+
const generate_globs_1 = require("@nx/js/src/utils/generate-globs");
|
|
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,ts,jsx,js,html}') {
|
|
11
|
+
try {
|
|
12
|
+
return (0, generate_globs_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
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('\nWARNING: There was an error creating glob patterns, returning an empty array\n' +
|
|
25
|
+
`${e.message}\n`);
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare module '*.module.scss' {
|
|
7
|
+
const classes: { readonly [key: string]: string };
|
|
8
|
+
export default classes;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module '*.module.sass' {
|
|
12
|
+
const classes: { readonly [key: string]: string };
|
|
13
|
+
export default classes;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module '*.module.less' {
|
|
17
|
+
const classes: { readonly [key: string]: string };
|
|
18
|
+
export default classes;
|
|
19
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react-dom" />
|
|
3
|
+
|
|
4
|
+
declare module '*.svg' {
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
export const ReactComponent: React.FunctionComponent<
|
|
8
|
+
React.SVGProps<SVGSVGElement> & { title?: string }
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
const src: string;
|
|
12
|
+
export default src;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare module '*.bmp' {
|
|
16
|
+
const src: string;
|
|
17
|
+
export default src;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare module '*.gif' {
|
|
21
|
+
const src: string;
|
|
22
|
+
export default src;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare module '*.jpg' {
|
|
26
|
+
const src: string;
|
|
27
|
+
export default src;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare module '*.jpeg' {
|
|
31
|
+
const src: string;
|
|
32
|
+
export default src;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare module '*.png' {
|
|
36
|
+
const src: string;
|
|
37
|
+
export default src;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare module '*.avif' {
|
|
41
|
+
const src: string;
|
|
42
|
+
export default src;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare module '*.webp' {
|
|
46
|
+
const src: string;
|
|
47
|
+
export default src;
|
|
48
|
+
}
|