@nx/angular 0.0.0-pr-31222-862e973 → 0.0.0-pr-31313-387cdca
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 +1 -1
- package/README.md +1 -1
- package/executors.d.ts +1 -6
- package/executors.js +2 -3
- package/executors.json +2 -2
- package/fesm2022/nx-angular-mf.mjs +64 -0
- package/fesm2022/nx-angular-mf.mjs.map +1 -1
- package/fesm2022/nx-angular.mjs +0 -352
- package/fesm2022/nx-angular.mjs.map +1 -1
- package/generators.d.ts +0 -1
- package/generators.js +0 -1
- package/generators.json +19 -18
- package/index.d.ts +1 -1
- package/mf/mf.d.ts +64 -0
- package/migrations.json +778 -1289
- package/module-federation/index.d.ts +5 -2
- package/module-federation/index.js +3 -4
- package/ng-package.json +2 -2
- package/package.json +17 -29
- package/src/builders/dev-server/dev-server.impl.js +6 -4
- package/src/builders/dev-server/lib/normalize-options.js +3 -0
- package/src/builders/dev-server/lib/validate-options.js +1 -9
- package/src/builders/dev-server/schema.d.ts +3 -0
- package/src/builders/dev-server/schema.json +8 -8
- package/src/builders/webpack-browser/schema.d.ts +0 -5
- package/src/builders/webpack-browser/schema.json +0 -2
- package/src/builders/webpack-browser/webpack-browser.impl.js +3 -4
- package/src/builders/webpack-server/schema.json +0 -1
- package/src/executors/application/application.impl.d.ts +1 -1
- package/src/executors/application/application.impl.js +4 -1
- package/src/executors/application/schema.json +78 -8
- package/src/executors/application/utils/normalize-options.d.ts +2 -0
- package/src/executors/application/utils/normalize-options.js +34 -0
- package/src/executors/application/utils/validate-options.js +18 -4
- package/src/executors/browser-esbuild/browser-esbuild.impl.d.ts +1 -1
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +0 -9
- package/src/executors/browser-esbuild/schema.json +1 -3
- package/src/executors/delegate-build/delegate-build.impl.d.ts +1 -3
- package/src/executors/delegate-build/delegate-build.impl.js +0 -3
- package/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
- package/src/executors/module-federation-dev-server/lib/index.js +0 -2
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -0
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +1 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +5 -31
- package/src/executors/module-federation-dev-server/schema.d.ts +4 -0
- package/src/executors/module-federation-dev-server/schema.json +2 -1
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +2 -2
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +1 -0
- package/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.d.ts +1 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +1 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +7 -35
- package/src/executors/module-federation-ssr-dev-server/schema.d.ts +8 -14
- package/src/executors/module-federation-ssr-dev-server/schema.json +1 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.d.ts +3 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.js +22 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.di.d.ts +2 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.di.js +17 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{v17+/ng-package → ng-package}/entry-point/write-bundles.transform.d.ts +3 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.transform.js +49 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.d.ts +2 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +7 -26
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.d.ts +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +1 -1
- package/src/executors/ng-packagr-lite/schema.json +3 -7
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.d.ts +2 -3
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +4 -21
- package/src/executors/package/package.impl.d.ts +2 -2
- package/src/executors/package/package.impl.js +6 -4
- package/src/executors/package/schema.d.ts +4 -6
- package/src/executors/package/schema.json +4 -10
- package/src/executors/utilities/ng-packagr/ng-packagr-version.d.ts +2 -0
- package/src/executors/utilities/ng-packagr/ng-packagr-version.js +11 -0
- package/src/executors/utilities/ng-packagr/package-imports.d.ts +1 -0
- package/src/executors/utilities/ng-packagr/package-imports.js +10 -0
- package/src/executors/utilities/ng-packagr/{stylesheet-processor.js → pre-v19/stylesheet-processor.js} +4 -4
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.d.ts +1 -1
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.js +23 -14
- package/src/executors/utilities/ng-packagr/tailwindcss.d.ts +0 -6
- package/src/executors/utilities/ng-packagr/tailwindcss.js +0 -32
- package/src/executors/utilities/ng-packagr/v19+/stylesheet-processor.d.ts +14 -0
- package/src/executors/utilities/ng-packagr/v19+/stylesheet-processor.js +99 -0
- package/src/generators/add-linting/add-linting.js +2 -17
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +2 -2
- package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
- package/src/generators/add-linting/schema.d.ts +1 -0
- package/src/generators/application/application.d.ts +0 -1
- package/src/generators/application/application.js +24 -9
- package/src/generators/application/files/ng-module/src/app/app.component.html__tpl__ +8 -1
- package/src/generators/application/files/ng-module/src/app/app.component.ts__tpl__ +4 -5
- package/src/generators/application/files/nx-welcome/claimed/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
- package/src/generators/application/files/nx-welcome/claimed/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
- package/src/generators/application/files/nx-welcome/not-configured/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
- package/src/generators/application/files/nx-welcome/not-configured/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
- package/src/generators/application/files/nx-welcome/unclaimed/ng-module/src/app/nx-welcome.component.ts__tpl__ +2 -1
- package/src/generators/application/files/nx-welcome/unclaimed/standalone/src/app/nx-welcome.component.ts__tpl__ +2 -2
- package/src/generators/application/files/rspack-ssr/server.ts__tmpl__ +72 -0
- package/src/generators/application/files/standalone-components/src/app/app.component.html__tpl__ +8 -1
- package/src/generators/application/files/standalone-components/src/app/app.component.ts__tpl__ +4 -6
- package/src/generators/application/lib/add-e2e.js +2 -9
- package/src/generators/application/lib/add-linting.js +2 -2
- package/src/generators/application/lib/add-serve-static-target.d.ts +1 -1
- package/src/generators/application/lib/add-serve-static-target.js +2 -3
- package/src/generators/application/lib/add-unit-test-runner.js +20 -7
- package/src/generators/application/lib/create-files.js +4 -1
- package/src/generators/application/lib/create-project.js +25 -31
- package/src/generators/application/lib/normalize-options.d.ts +1 -1
- package/src/generators/application/lib/normalize-options.js +14 -15
- package/src/generators/application/schema.d.ts +5 -6
- package/src/generators/application/schema.json +16 -21
- package/src/generators/component/component.d.ts +0 -1
- package/src/generators/component/component.js +4 -7
- package/src/generators/component/files/__fileName__.__style__ +1 -1
- package/src/generators/component/files/__fileName__.spec.ts__tpl__ +1 -1
- package/src/generators/component/files/__fileName__.ts__tpl__ +5 -13
- package/src/generators/component/lib/normalize-options.js +8 -6
- package/src/generators/component/schema.d.ts +3 -18
- package/src/generators/component/schema.json +11 -28
- package/src/generators/component-story/files/__componentFileName__.stories.ts__tmpl__ +4 -4
- package/src/generators/component-test/component-test.js +1 -1
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +1 -4
- package/src/generators/convert-to-application-executor/schema.json +1 -1
- package/src/generators/convert-to-rspack/convert-to-rspack.d.ts +4 -0
- package/src/generators/convert-to-rspack/convert-to-rspack.js +357 -0
- package/src/generators/convert-to-rspack/lib/create-config.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/create-config.js +45 -0
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +6 -0
- package/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +77 -0
- package/src/generators/convert-to-rspack/lib/update-tsconfig.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/update-tsconfig.js +26 -0
- package/src/generators/convert-to-rspack/lib/validate-supported-executor.d.ts +2 -0
- package/src/generators/convert-to-rspack/lib/validate-supported-executor.js +14 -0
- package/src/generators/convert-to-rspack/schema.d.ts +5 -0
- package/src/generators/convert-to-rspack/schema.json +30 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +1 -2
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +1 -7
- package/src/generators/directive/directive.js +5 -0
- package/src/generators/directive/files/__fileName__.ts__tpl__ +2 -2
- package/src/generators/directive/lib/normalize-options.js +6 -7
- package/src/generators/directive/schema.d.ts +2 -17
- package/src/generators/directive/schema.json +20 -28
- package/src/generators/federate-module/lib/add-remote.js +0 -3
- package/src/generators/federate-module/schema.d.ts +0 -2
- package/src/generators/federate-module/schema.json +19 -16
- package/src/generators/host/files/common/{v17+/src → src}/main.server.ts__tmpl__ +1 -1
- package/src/generators/host/files/js/webpack.server.config.js__tmpl__ +1 -1
- package/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +1 -1
- package/src/generators/host/host.d.ts +1 -2
- package/src/generators/host/host.js +33 -25
- package/src/generators/host/lib/update-ssr-setup.js +7 -3
- package/src/generators/host/schema.d.ts +4 -5
- package/src/generators/host/schema.json +34 -27
- package/src/generators/init/init.js +3 -1
- package/src/generators/library/files/base/README.md__tpl__ +2 -2
- package/src/generators/library/lib/add-project.d.ts +1 -1
- package/src/generators/library/lib/add-project.js +7 -1
- package/src/generators/library/lib/add-standalone-component.js +4 -3
- package/src/generators/library/lib/normalize-options.js +4 -5
- package/src/generators/library/lib/normalized-schema.d.ts +2 -3
- package/src/generators/library/library.d.ts +0 -1
- package/src/generators/library/library.js +27 -19
- package/src/generators/library/schema.d.ts +2 -5
- package/src/generators/library/schema.json +9 -20
- package/src/generators/move/lib/update-secondary-entry-points.js +1 -0
- package/src/generators/move/move.d.ts +3 -1
- package/src/generators/move/move.js +4 -8
- package/src/generators/move/schema.d.ts +0 -3
- package/src/generators/move/schema.json +0 -5
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js +1 -1
- package/src/generators/ng-add/migrators/builders/angular-devkit-ng-packagr.migrator.js +4 -3
- package/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +1 -1
- package/src/generators/ng-add/migrators/builders/builder.migrator.d.ts +2 -2
- package/src/generators/ng-add/migrators/builders/builder.migrator.js +4 -4
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +4 -4
- package/src/generators/ng-add/migrators/projects/project.migrator.js +1 -1
- package/src/generators/ng-add/utilities/validation-logging.js +5 -4
- package/src/generators/ng-add/utilities/workspace.js +5 -2
- package/src/generators/ngrx/ngrx.d.ts +3 -0
- package/src/generators/ngrx/ngrx.js +3 -0
- package/src/generators/ngrx/schema.json +1 -1
- package/src/generators/ngrx-feature-store/schema.d.ts +1 -1
- package/src/generators/ngrx-root-store/lib/add-imports.js +4 -4
- package/src/generators/ngrx-root-store/lib/normalize-options.js +3 -2
- package/src/generators/pipe/files/__fileName__.ts__tpl__ +2 -2
- package/src/generators/pipe/lib/normalize-options.js +6 -7
- package/src/generators/pipe/pipe.js +5 -0
- package/src/generators/pipe/schema.d.ts +2 -17
- package/src/generators/pipe/schema.json +20 -28
- package/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +1 -1
- package/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/src/generators/remote/files/common/{v17+/src → src}/main.server.ts__tmpl__ +1 -1
- package/src/generators/remote/lib/update-ssr-setup.js +7 -3
- package/src/generators/remote/remote.d.ts +1 -2
- package/src/generators/remote/remote.js +38 -14
- package/src/generators/remote/schema.d.ts +4 -5
- package/src/generators/remote/schema.json +32 -25
- package/src/generators/scam/lib/normalize-options.js +6 -7
- package/src/generators/scam/scam.js +0 -2
- package/src/generators/scam/schema.d.ts +3 -17
- package/src/generators/scam/schema.json +16 -30
- package/src/generators/scam-directive/lib/normalize-options.js +6 -7
- package/src/generators/scam-directive/scam-directive.js +0 -2
- package/src/generators/scam-directive/schema.d.ts +3 -17
- package/src/generators/scam-directive/schema.json +16 -31
- package/src/generators/scam-pipe/lib/normalize-options.js +6 -7
- package/src/generators/scam-pipe/scam-pipe.js +0 -2
- package/src/generators/scam-pipe/schema.d.ts +3 -17
- package/src/generators/scam-pipe/schema.json +16 -31
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.d.ts +1 -1
- package/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +5 -4
- package/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +3 -1
- package/src/generators/setup-mf/files/entry-module-files/entry.component.ts__tmpl__ +2 -1
- package/src/generators/setup-mf/files/standalone-entry-component-files/entry.component.ts__tmpl__ +2 -2
- package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +4 -1
- package/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +3 -0
- package/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +1 -1
- package/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +1 -1
- package/src/generators/setup-mf/lib/add-remote-entry.js +5 -0
- package/src/generators/setup-mf/lib/add-remote-to-host.js +21 -8
- package/src/generators/setup-mf/lib/fix-bootstrap.js +3 -2
- package/src/generators/setup-mf/lib/setup-serve-target.js +1 -0
- package/src/generators/setup-mf/lib/setup-tspath-for-remote.js +1 -1
- package/src/generators/setup-mf/schema.json +5 -3
- package/src/generators/setup-mf/setup-mf.js +5 -2
- package/src/generators/setup-ssr/files/{server → pre-v19/server}/application-builder/__serverFileName__ +1 -1
- package/src/generators/setup-ssr/files/{server/server-builder/v17+ → pre-v19/server/server-builder}/__serverFileName__ +1 -1
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/__main__ +1 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/__rootModuleFileName__ +13 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/ngmodule-src/app/app.routes.server.ts__tpl__ +8 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/server/__serverFileName__ +66 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/__main__ +7 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.config.server.ts__tpl__ +14 -0
- package/src/generators/setup-ssr/files/v19+/application-builder/standalone-src/app/app.routes.server.ts__tpl__ +8 -0
- package/src/generators/setup-ssr/files/v19+/application-builder-common-engine/server/__serverFileName__ +67 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/ngmodule-src/__main__ +1 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/ngmodule-src/app/__rootModuleFileName__ +14 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/root/tsconfig.server.json.template +16 -0
- package/src/generators/setup-ssr/files/{server/server-builder/pre-v17 → v19+/server-builder/server}/__serverFileName__ +25 -15
- package/src/generators/setup-ssr/files/v19+/server-builder/standalone-src/__main__ +7 -0
- package/src/generators/setup-ssr/files/v19+/server-builder/standalone-src/app/app.config.server.ts.template +11 -0
- package/src/generators/setup-ssr/lib/add-dependencies.js +6 -17
- package/src/generators/setup-ssr/lib/add-hydration.d.ts +2 -2
- package/src/generators/setup-ssr/lib/add-hydration.js +10 -2
- package/src/generators/setup-ssr/lib/add-server-file.d.ts +2 -2
- package/src/generators/setup-ssr/lib/add-server-file.js +24 -10
- package/src/generators/setup-ssr/lib/generate-files.d.ts +2 -2
- package/src/generators/setup-ssr/lib/generate-files.js +31 -8
- package/src/generators/setup-ssr/lib/generate-server-ts-config.d.ts +3 -3
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +24 -3
- package/src/generators/setup-ssr/lib/normalize-options.d.ts +3 -14
- package/src/generators/setup-ssr/lib/normalize-options.js +27 -6
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.d.ts +2 -2
- package/src/generators/setup-ssr/lib/update-project-config.d.ts +3 -3
- package/src/generators/setup-ssr/lib/update-project-config.js +37 -24
- package/src/generators/setup-ssr/lib/validate-options.js +5 -0
- package/src/generators/setup-ssr/schema.d.ts +5 -0
- package/src/generators/setup-ssr/schema.json +6 -8
- package/src/generators/setup-ssr/setup-ssr.js +6 -11
- package/src/generators/setup-tailwind/lib/index.d.ts +1 -1
- package/src/generators/setup-tailwind/lib/index.js +1 -1
- package/src/generators/setup-tailwind/lib/update-application-styles.js +1 -1
- package/src/generators/setup-tailwind/lib/validate-build-target.d.ts +3 -0
- package/src/generators/setup-tailwind/lib/{add-tailwind-config-path-to-project.js → validate-build-target.js} +5 -15
- package/src/generators/setup-tailwind/setup-tailwind.js +4 -1
- package/src/generators/stories/schema.d.ts +0 -2
- package/src/generators/stories/schema.json +0 -10
- package/src/generators/stories/stories.js +2 -21
- package/src/generators/storybook-configuration/lib/generate-stories.js +0 -6
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +0 -2
- package/src/generators/storybook-configuration/schema.d.ts +0 -3
- package/src/generators/storybook-configuration/schema.json +0 -15
- package/src/generators/storybook-configuration/storybook-configuration.js +0 -3
- package/src/generators/utils/add-jest.d.ts +1 -0
- package/src/generators/utils/add-jest.js +5 -9
- package/src/generators/utils/add-vitest.d.ts +9 -0
- package/src/generators/utils/add-vitest.js +21 -0
- package/src/generators/utils/assert-mf-utils.d.ts +1 -0
- package/src/generators/utils/assert-mf-utils.js +11 -0
- package/src/generators/utils/ensure-angular-dependencies.js +0 -1
- package/src/generators/utils/storybook-ast/component-info.js +13 -3
- package/src/generators/utils/testing.js +15 -28
- package/src/generators/utils/validations.d.ts +1 -0
- package/src/generators/utils/validations.js +10 -0
- package/src/generators/utils/version-utils.d.ts +1 -0
- package/src/generators/utils/version-utils.js +7 -2
- package/src/migrations/update-16-2-0/switch-data-persistence-operators-imports-to-ngrx-router-store.js +4 -4
- package/src/migrations/update-19-6-0/turn-off-dts-by-default.js +2 -2
- package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.d.ts +3 -0
- package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.js +55 -0
- package/src/migrations/{update-14-2-0/remove-show-circular-dependencies-option.d.ts → update-20-2-0/disable-angular-eslint-prefer-standalone.d.ts} +1 -1
- package/src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone.js +55 -0
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +2 -0
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +61 -0
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +2 -0
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +41 -0
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.d.ts +3 -0
- package/src/migrations/update-20-2-0/remove-angular-eslint-rules.js +62 -0
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.d.ts +3 -0
- package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.js +73 -0
- package/src/migrations/{update-14-5-2 → update-20-2-0}/update-angular-cli.d.ts +1 -0
- package/src/migrations/{update-16-1-0 → update-20-2-0}/update-angular-cli.js +1 -1
- package/src/migrations/{update-14-2-0/update-libraries-secondary-entrypoints.d.ts → update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.d.ts} +1 -1
- package/src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.js +55 -0
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +2 -0
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +18 -0
- package/src/migrations/{update-14-2-0 → update-20-4-0}/update-angular-cli.d.ts +1 -0
- package/src/migrations/{update-14-2-0 → update-20-4-0}/update-angular-cli.js +4 -3
- package/src/migrations/{update-14-6-0 → update-20-5-0}/update-angular-cli.d.ts +1 -0
- package/src/migrations/{update-14-5-2 → update-20-5-0}/update-angular-cli.js +4 -3
- package/src/migrations/{update-14-2-0/update-ngcc-target.d.ts → update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.d.ts} +1 -1
- package/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.js +122 -0
- package/src/migrations/update-21-0-0/set-continuous-option.d.ts +3 -0
- package/src/migrations/update-21-0-0/set-continuous-option.js +29 -0
- package/src/plugins/plugin.js +7 -2
- package/src/utils/backward-compatible-versions.d.ts +4 -4
- package/src/utils/backward-compatible-versions.js +27 -23
- package/src/utils/nx-devkit/ast-utils.d.ts +3 -2
- package/src/utils/nx-devkit/ast-utils.js +22 -4
- package/src/utils/test-runners.d.ts +2 -1
- package/src/utils/test-runners.js +1 -0
- package/src/utils/versions.d.ts +13 -11
- package/src/utils/versions.js +14 -12
- package/esm2022/index.mjs +0 -2
- package/esm2022/mf/index.mjs +0 -2
- package/esm2022/mf/mf.mjs +0 -52
- package/esm2022/mf/nx-angular-mf.mjs +0 -5
- package/esm2022/nx-angular.mjs +0 -5
- package/esm2022/src/runtime/nx/data-persistence.mjs +0 -349
- package/esm2022/testing/index.mjs +0 -2
- package/esm2022/testing/nx-angular-testing.mjs +0 -5
- package/esm2022/testing/src/testing-utils.mjs +0 -38
- package/fesm2022/nx-angular-testing.mjs +0 -45
- package/fesm2022/nx-angular-testing.mjs.map +0 -1
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +0 -65
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.d.ts +0 -9
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +0 -51
- package/src/executors/module-federation-ssr-dev-server/lib/build-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-ssr-dev-server/lib/build-static-remotes.js +0 -65
- package/src/executors/module-federation-ssr-dev-server/lib/start-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-ssr-dev-server/lib/start-static-remotes.js +0 -41
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.d.ts +0 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.di.js +0 -27
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.d.ts +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.js +0 -53
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.d.ts +0 -15
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.di.js +0 -28
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.d.ts +0 -30
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/entry-point.transform.js +0 -52
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.d.ts +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.di.js +0 -20
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.d.ts +0 -9
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.js +0 -320
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.d.ts +0 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js +0 -35
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.d.ts +0 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/package.di.js +0 -37
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.d.ts +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +0 -178
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.d.ts +0 -42
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.d.ts +0 -10
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.di.js +0 -17
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js +0 -201
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.d.ts +0 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.js +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.js +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.js +0 -18
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.js +0 -286
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.d.ts +0 -14
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.js +0 -26
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.d.ts +0 -12
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +0 -71
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.d.ts +0 -13
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.js +0 -32
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.d.ts +0 -14
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.js +0 -35
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.d.ts +0 -14
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.js +0 -37
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.d.ts +0 -13
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +0 -183
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.d.ts +0 -36
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.d.ts +0 -10
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.di.js +0 -17
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +0 -194
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.d.ts +0 -1
- package/src/executors/package/ng-packagr-adjustments/utils/ng-compiler-cli.js +0 -9
- package/src/generators/component-cypress-spec/component-cypress-spec.d.ts +0 -4
- package/src/generators/component-cypress-spec/component-cypress-spec.js +0 -35
- package/src/generators/component-cypress-spec/files/__componentFileName__.__fileExt__ +0 -17
- package/src/generators/component-cypress-spec/lib/get-args-default-value.d.ts +0 -2
- package/src/generators/component-cypress-spec/lib/get-args-default-value.js +0 -24
- package/src/generators/component-cypress-spec/lib/get-component-selector.d.ts +0 -2
- package/src/generators/component-cypress-spec/lib/get-component-selector.js +0 -23
- package/src/generators/component-cypress-spec/schema.d.ts +0 -10
- package/src/generators/component-cypress-spec/schema.json +0 -66
- package/src/generators/host/files/common/pre-v17/src/main.server.ts__tmpl__ +0 -66
- package/src/generators/remote/files/common/pre-v17/src/main.server.ts__tmpl__ +0 -72
- package/src/generators/setup-tailwind/lib/add-tailwind-config-path-to-project.d.ts +0 -3
- package/src/generators/stories/lib/get-e2e-project.d.ts +0 -2
- package/src/generators/stories/lib/get-e2e-project.js +0 -14
- package/src/generators/storybook-configuration/lib/validate-options.d.ts +0 -2
- package/src/generators/storybook-configuration/lib/validate-options.js +0 -8
- package/src/migrations/update-14-2-0/remove-show-circular-dependencies-option.js +0 -23
- package/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.js +0 -34
- package/src/migrations/update-14-2-0/update-ngcc-target.js +0 -17
- package/src/migrations/update-14-2-0/update-router-initial-navigation.d.ts +0 -2
- package/src/migrations/update-14-2-0/update-router-initial-navigation.js +0 -73
- package/src/migrations/update-14-2-0/update-tsconfig-target.d.ts +0 -2
- package/src/migrations/update-14-2-0/update-tsconfig-target.js +0 -155
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.d.ts +0 -5
- package/src/migrations/update-14-5-0/migrate-mfe-to-mf.js +0 -90
- package/src/migrations/update-14-6-0/update-angular-cli.js +0 -22
- package/src/migrations/update-14-8-0/rename-webpack-server.d.ts +0 -2
- package/src/migrations/update-14-8-0/rename-webpack-server.js +0 -21
- package/src/migrations/update-15-0-0/add-karma-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-karma-inputs.js +0 -41
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.d.ts +0 -2
- package/src/migrations/update-15-0-0/switch-to-jasmine-marbles.js +0 -102
- package/src/migrations/update-15-2-0/remove-browserlist-config.d.ts +0 -4
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +0 -59
- package/src/migrations/update-15-2-0/remove-platform-server-exports.d.ts +0 -2
- package/src/migrations/update-15-2-0/remove-platform-server-exports.js +0 -62
- package/src/migrations/update-15-2-0/update-angular-cli.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-angular-cli.js +0 -22
- package/src/migrations/update-15-2-0/update-karma-main-file.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-karma-main-file.js +0 -72
- package/src/migrations/update-15-2-0/update-typescript-target.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-typescript-target.js +0 -52
- package/src/migrations/update-15-2-0/update-workspace-config.d.ts +0 -2
- package/src/migrations/update-15-2-0/update-workspace-config.js +0 -24
- package/src/migrations/update-15-5-0/update-angular-cli.d.ts +0 -2
- package/src/migrations/update-15-5-0/update-angular-cli.js +0 -22
- package/src/migrations/update-15-7-0/install-required-packages.d.ts +0 -2
- package/src/migrations/update-15-7-0/install-required-packages.js +0 -36
- package/src/migrations/update-15-8-0/update-angular-cli.d.ts +0 -2
- package/src/migrations/update-15-8-0/update-angular-cli.js +0 -22
- package/src/migrations/update-15-9-0/update-file-server-executor.d.ts +0 -2
- package/src/migrations/update-15-9-0/update-file-server-executor.js +0 -42
- package/src/migrations/update-15-9-0/update-testing-tsconfig.d.ts +0 -3
- package/src/migrations/update-15-9-0/update-testing-tsconfig.js +0 -32
- package/src/migrations/update-16-0-0/remove-karma-defaults.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-karma-defaults.js +0 -52
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option.js +0 -40
- package/src/migrations/update-16-0-0/remove-protractor-defaults.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-protractor-defaults.js +0 -52
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -9
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.d.ts +0 -2
- package/src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap.js +0 -127
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.d.ts +0 -2
- package/src/migrations/update-16-1-0/remove-ngcc-invocation.js +0 -22
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.d.ts +0 -2
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +0 -62
- package/src/migrations/update-16-1-0/update-angular-cli.d.ts +0 -3
- package/src/migrations/update-16-1-0/update-server-executor-config.d.ts +0 -2
- package/src/migrations/update-16-1-0/update-server-executor-config.js +0 -26
- package/src/runtime/nx/data-persistence.d.ts +0 -276
- package/src/utils/mf/utils.d.ts +0 -15
- package/src/utils/mf/utils.js +0 -101
- package/src/utils/mf/with-module-federation-ssr.d.ts +0 -2
- package/src/utils/mf/with-module-federation-ssr.js +0 -68
- package/src/utils/mf/with-module-federation.d.ts +0 -2
- package/src/utils/mf/with-module-federation.js +0 -70
- package/testing/index.d.ts +0 -1
- package/testing/ng-package.json +0 -6
- package/testing/src/testing-utils.d.ts +0 -33
- /package/src/executors/utilities/ng-packagr/{stylesheet-processor.d.ts → pre-v19/stylesheet-processor.d.ts} +0 -0
- /package/src/generators/setup-ssr/files/{ngmodule/src → pre-v19/ngmodule-src}/__main__ +0 -0
- /package/src/generators/setup-ssr/files/{ngmodule/src → pre-v19/ngmodule-src}/app/__rootModuleFileName__ +0 -0
- /package/src/generators/setup-ssr/files/{root → pre-v19/root}/tsconfig.server.json__tpl__ +0 -0
- /package/src/generators/setup-ssr/files/{standalone/src → pre-v19/standalone-src}/__main__ +0 -0
- /package/src/generators/setup-ssr/files/{standalone/src → pre-v19/standalone-src}/app/app.config.server.ts__tpl__ +0 -0
|
@@ -7,10 +7,11 @@ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const rxjs_1 = require("rxjs");
|
|
9
9
|
const operators_1 = require("rxjs/operators");
|
|
10
|
+
const angular_version_utils_1 = require("../utilities/angular-version-utils");
|
|
10
11
|
const typescript_1 = require("../utilities/typescript");
|
|
11
12
|
const ng_packagr_1 = require("./ng-packagr-adjustments/ng-packagr");
|
|
12
13
|
async function initializeNgPackagr(options, context, projectDependencies) {
|
|
13
|
-
const ngPackagr = await (0, ng_packagr_1.getNgPackagrInstance)(
|
|
14
|
+
const ngPackagr = await (0, ng_packagr_1.getNgPackagrInstance)();
|
|
14
15
|
ngPackagr.forProject((0, path_1.resolve)(context.root, options.project));
|
|
15
16
|
if (options.tsConfig) {
|
|
16
17
|
const remappedTsConfigFilePath = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.root, options.tsConfig), context.root, context.projectsConfigurations.projects[context.projectName].root, projectDependencies);
|
|
@@ -26,10 +27,11 @@ async function initializeNgPackagr(options, context, projectDependencies) {
|
|
|
26
27
|
*/
|
|
27
28
|
function createLibraryExecutor(initializeNgPackagr) {
|
|
28
29
|
return async function* (options, context) {
|
|
29
|
-
const {
|
|
30
|
-
if (
|
|
31
|
-
|
|
30
|
+
const { major: angularMajorVersion, version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
31
|
+
if (angularMajorVersion < 18 && options.poll !== undefined) {
|
|
32
|
+
throw new Error(`The "poll" option requires Angular version 18.0.0 or greater. You are currently using version ${angularVersion}.`);
|
|
32
33
|
}
|
|
34
|
+
const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
|
|
33
35
|
if (options.watch) {
|
|
34
36
|
return yield* (0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.mapTo)({ success: true })));
|
|
35
37
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
watch?: boolean;
|
|
6
|
-
}
|
|
1
|
+
import type { NgPackagrBuilderOptions } from '@angular-devkit/build-angular';
|
|
2
|
+
|
|
3
|
+
export interface BuildAngularLibraryExecutorOptions
|
|
4
|
+
extends NgPackagrBuilderOptions {}
|
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
4
|
"$schema": "https://json-schema.org/schema",
|
|
5
5
|
"title": "ng-packagr Target",
|
|
6
|
-
"description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is a drop-in replacement for the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.",
|
|
6
|
+
"description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is a drop-in replacement for the `@angular-devkit/build-angular:ng-packagr` and `@angular/build:ng-packagr` builders, with additional support for incremental builds.",
|
|
7
7
|
"cli": "nx",
|
|
8
8
|
"type": "object",
|
|
9
9
|
"presets": [
|
|
10
|
-
{
|
|
11
|
-
"name": "Publishable Library with Tailwind",
|
|
12
|
-
"keys": ["project", "tailwindConfig"]
|
|
13
|
-
},
|
|
14
10
|
{
|
|
15
11
|
"name": "Updating Project Dependencies for Publishable Library",
|
|
16
12
|
"keys": ["project"]
|
|
@@ -33,11 +29,9 @@
|
|
|
33
29
|
"description": "Whether to run a build when any file changes.",
|
|
34
30
|
"default": false
|
|
35
31
|
},
|
|
36
|
-
"
|
|
37
|
-
"type": "
|
|
38
|
-
"description": "
|
|
39
|
-
"x-completion-type": "file",
|
|
40
|
-
"x-completion-glob": "tailwind.config@(.js|.cjs|.mjs|.ts)"
|
|
32
|
+
"poll": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
|
|
41
35
|
}
|
|
42
36
|
},
|
|
43
37
|
"additionalProperties": false,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNgPackagrVersionInfo = getNgPackagrVersionInfo;
|
|
4
|
+
const angular_version_utils_1 = require("../angular-version-utils");
|
|
5
|
+
let ngPackagrVersionInfo;
|
|
6
|
+
function getNgPackagrVersionInfo() {
|
|
7
|
+
if (!ngPackagrVersionInfo) {
|
|
8
|
+
ngPackagrVersionInfo = (0, angular_version_utils_1.getInstalledPackageVersionInfo)('ng-packagr');
|
|
9
|
+
}
|
|
10
|
+
return ngPackagrVersionInfo;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function importNgPackagrPath<T>(path: string, ngPackagrMajorVersion: number): T;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.importNgPackagrPath = importNgPackagrPath;
|
|
4
|
+
function importNgPackagrPath(path, ngPackagrMajorVersion) {
|
|
5
|
+
let finalPath = path;
|
|
6
|
+
if (ngPackagrMajorVersion >= 20 && !path.startsWith('ng-packagr/src/')) {
|
|
7
|
+
finalPath = path.replace(/^ng-packagr\//, 'ng-packagr/src/');
|
|
8
|
+
}
|
|
9
|
+
return require(finalPath);
|
|
10
|
+
}
|
|
@@ -15,10 +15,10 @@ const path_1 = require("path");
|
|
|
15
15
|
const Piscina = require('piscina');
|
|
16
16
|
const color_1 = require("ng-packagr/lib/utils/color");
|
|
17
17
|
// using this instead of the one from ng-packagr
|
|
18
|
-
const tailwindcss_1 = require("
|
|
18
|
+
const tailwindcss_1 = require("../tailwindcss");
|
|
19
19
|
const devkit_1 = require("@nx/devkit");
|
|
20
20
|
const semver_1 = require("semver");
|
|
21
|
-
const
|
|
21
|
+
const ng_packagr_version_1 = require("../ng-packagr-version");
|
|
22
22
|
const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS'];
|
|
23
23
|
const maxThreads = typeof maxWorkersVariable === 'string' && maxWorkersVariable !== ''
|
|
24
24
|
? +maxWorkersVariable
|
|
@@ -72,7 +72,7 @@ class StylesheetProcessor {
|
|
|
72
72
|
currentDir = (0, path_1.dirname)(prevDir);
|
|
73
73
|
}
|
|
74
74
|
const browserslistData = (0, browserslist_1.default)(undefined, { path: this.basePath });
|
|
75
|
-
const { version: ngPackagrVersion } = (0,
|
|
75
|
+
const { version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
|
|
76
76
|
let tailwindConfigPath;
|
|
77
77
|
let postcssConfiguration;
|
|
78
78
|
if ((0, semver_1.gte)(ngPackagrVersion, '18.0.0')) {
|
|
@@ -163,7 +163,7 @@ class AsyncStylesheetProcessor {
|
|
|
163
163
|
currentDir = (0, path_1.dirname)(prevDir);
|
|
164
164
|
}
|
|
165
165
|
const browserslistData = (0, browserslist_1.default)(undefined, { path: this.basePath });
|
|
166
|
-
const { version: ngPackagrVersion } = (0,
|
|
166
|
+
const { version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
|
|
167
167
|
let postcssConfiguration;
|
|
168
168
|
if (ngPackagrVersion === '17.2.0') {
|
|
169
169
|
const { loadPostcssConfiguration, } = require('ng-packagr/lib/styles/postcss-configuration');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { FactoryProvider } from 'injection-js';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function getStylesheetProcessorFactoryProvider(): FactoryProvider;
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
exports.getStylesheetProcessorFactoryProvider = getStylesheetProcessorFactoryProvider;
|
|
4
|
+
const ng_packagr_version_1 = require("./ng-packagr-version");
|
|
5
|
+
const package_imports_1 = require("./package-imports");
|
|
6
|
+
function getStylesheetProcessorFactoryProvider() {
|
|
7
|
+
const { major: ngPackagrMajorVersion, version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
|
|
8
|
+
const { STYLESHEET_PROCESSOR_TOKEN } = (0, package_imports_1.importNgPackagrPath)('ng-packagr/lib/styles/stylesheet-processor.di', ngPackagrMajorVersion);
|
|
9
|
+
return {
|
|
10
|
+
provide: STYLESHEET_PROCESSOR_TOKEN,
|
|
11
|
+
useFactory: () => {
|
|
12
|
+
if (ngPackagrMajorVersion >= 19) {
|
|
13
|
+
const { getStylesheetProcessor, } = require('./v19+/stylesheet-processor');
|
|
14
|
+
return getStylesheetProcessor();
|
|
15
|
+
}
|
|
16
|
+
if (ngPackagrVersion !== '17.2.0') {
|
|
17
|
+
const { StylesheetProcessor, } = require('./pre-v19/stylesheet-processor');
|
|
18
|
+
return StylesheetProcessor;
|
|
19
|
+
}
|
|
20
|
+
const { AsyncStylesheetProcessor, } = require('./pre-v19/stylesheet-processor');
|
|
21
|
+
return AsyncStylesheetProcessor;
|
|
22
|
+
},
|
|
23
|
+
deps: [],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export interface TailwindSetup {
|
|
2
|
-
tailwindConfigPath: string;
|
|
3
|
-
tailwindPackagePath: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function getTailwindSetup(basePath: string, tailwindConfig?: string): TailwindSetup | undefined;
|
|
6
1
|
export declare function getTailwindConfigPath(projectRoot: string, workspaceRoot: string): string | undefined;
|
|
7
|
-
export declare function getTailwindPostCssPlugin({ tailwindConfigPath, tailwindPackagePath, }: TailwindSetup): any;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTailwindSetup = getTailwindSetup;
|
|
4
3
|
exports.getTailwindConfigPath = getTailwindConfigPath;
|
|
5
|
-
exports.getTailwindPostCssPlugin = getTailwindPostCssPlugin;
|
|
6
|
-
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const devkit_2 = require("@nx/devkit");
|
|
8
4
|
const fs_1 = require("fs");
|
|
9
5
|
const path_1 = require("path");
|
|
10
|
-
function getTailwindSetup(basePath, tailwindConfig) {
|
|
11
|
-
let tailwindConfigPath = tailwindConfig;
|
|
12
|
-
if (!tailwindConfigPath) {
|
|
13
|
-
tailwindConfigPath = getTailwindConfigPath(basePath, devkit_2.workspaceRoot);
|
|
14
|
-
}
|
|
15
|
-
// Only load Tailwind CSS plugin if configuration file was found.
|
|
16
|
-
if (!tailwindConfigPath) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
let tailwindPackagePath;
|
|
20
|
-
try {
|
|
21
|
-
tailwindPackagePath = require.resolve('tailwindcss');
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
const relativeTailwindConfigPath = (0, path_1.relative)(devkit_2.workspaceRoot, tailwindConfigPath);
|
|
25
|
-
devkit_1.logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +
|
|
26
|
-
` but the 'tailwindcss' package is not installed.` +
|
|
27
|
-
` To enable Tailwind CSS, please install the 'tailwindcss' package.`);
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
if (!tailwindPackagePath) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
return { tailwindConfigPath, tailwindPackagePath };
|
|
34
|
-
}
|
|
35
6
|
function getTailwindConfigPath(projectRoot, workspaceRoot) {
|
|
36
7
|
// valid tailwind config files https://github.com/tailwindlabs/tailwindcss/blob/master/src/util/resolveConfigPath.js#L4
|
|
37
8
|
const tailwindConfigFiles = [
|
|
@@ -50,6 +21,3 @@ function getTailwindConfigPath(projectRoot, workspaceRoot) {
|
|
|
50
21
|
}
|
|
51
22
|
return undefined;
|
|
52
23
|
}
|
|
53
|
-
function getTailwindPostCssPlugin({ tailwindConfigPath, tailwindPackagePath, }) {
|
|
54
|
-
return require(tailwindPackagePath)({ config: tailwindConfigPath });
|
|
55
|
-
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from the original ng-packagr source.
|
|
3
|
+
*
|
|
4
|
+
* Changes made:
|
|
5
|
+
* - Add the project root to the search directories.
|
|
6
|
+
*/
|
|
7
|
+
import type { NgPackageEntryConfig } from 'ng-packagr/ng-entrypoint.schema';
|
|
8
|
+
export declare enum CssUrl {
|
|
9
|
+
inline = "inline",
|
|
10
|
+
none = "none"
|
|
11
|
+
}
|
|
12
|
+
export declare function getStylesheetProcessor(): new (projectBasePath: string, basePath: string, cssUrl?: CssUrl, includePaths?: string[], sass?: NgPackageEntryConfig['lib']['sass'], cacheDirectory?: string | false, watch?: boolean) => {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Adapted from the original ng-packagr source.
|
|
4
|
+
*
|
|
5
|
+
* Changes made:
|
|
6
|
+
* - Add the project root to the search directories.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CssUrl = void 0;
|
|
10
|
+
exports.getStylesheetProcessor = getStylesheetProcessor;
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
12
|
+
const devkit_1 = require("@nx/devkit");
|
|
13
|
+
const browserslist_1 = tslib_1.__importDefault(require("browserslist"));
|
|
14
|
+
const ng_packagr_version_1 = require("../ng-packagr-version");
|
|
15
|
+
const package_imports_1 = require("../package-imports");
|
|
16
|
+
var CssUrl;
|
|
17
|
+
(function (CssUrl) {
|
|
18
|
+
CssUrl["inline"] = "inline";
|
|
19
|
+
CssUrl["none"] = "none";
|
|
20
|
+
})(CssUrl || (exports.CssUrl = CssUrl = {}));
|
|
21
|
+
function getStylesheetProcessor() {
|
|
22
|
+
const { major: ngPackagrMajorVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
|
|
23
|
+
const { ComponentStylesheetBundler } = (0, package_imports_1.importNgPackagrPath)('ng-packagr/lib/styles/component-stylesheets', ngPackagrMajorVersion);
|
|
24
|
+
const { generateSearchDirectories, getTailwindConfig, loadPostcssConfiguration, } = (0, package_imports_1.importNgPackagrPath)('ng-packagr/lib/styles/postcss-configuration', ngPackagrMajorVersion);
|
|
25
|
+
class StylesheetProcessor extends ComponentStylesheetBundler {
|
|
26
|
+
constructor(projectBasePath, basePath, cssUrl, includePaths, sass, cacheDirectory, watch) {
|
|
27
|
+
// By default, browserslist defaults are too inclusive
|
|
28
|
+
// https://github.com/browserslist/browserslist/blob/83764ea81ffaa39111c204b02c371afa44a4ff07/index.js#L516-L522
|
|
29
|
+
// We change the default query to browsers that Angular support.
|
|
30
|
+
// https://angular.io/guide/browser-support
|
|
31
|
+
browserslist_1.default.defaults = [
|
|
32
|
+
'last 2 Chrome versions',
|
|
33
|
+
'last 1 Firefox version',
|
|
34
|
+
'last 2 Edge major versions',
|
|
35
|
+
'last 2 Safari major versions',
|
|
36
|
+
'last 2 iOS major versions',
|
|
37
|
+
'Firefox ESR',
|
|
38
|
+
];
|
|
39
|
+
const browserslistData = (0, browserslist_1.default)(undefined, { path: basePath });
|
|
40
|
+
let searchDirs = generateSearchDirectories([projectBasePath]);
|
|
41
|
+
const postcssConfiguration = loadPostcssConfiguration(searchDirs);
|
|
42
|
+
// (nx-specific): we support loading the TailwindCSS config from the root of the workspace
|
|
43
|
+
searchDirs = generateSearchDirectories([projectBasePath, devkit_1.workspaceRoot]);
|
|
44
|
+
super({
|
|
45
|
+
cacheDirectory: cacheDirectory,
|
|
46
|
+
postcssConfiguration: postcssConfiguration,
|
|
47
|
+
tailwindConfiguration: postcssConfiguration
|
|
48
|
+
? undefined
|
|
49
|
+
: getTailwindConfig(searchDirs, projectBasePath),
|
|
50
|
+
sass: sass,
|
|
51
|
+
workspaceRoot: projectBasePath,
|
|
52
|
+
cssUrl: cssUrl,
|
|
53
|
+
target: transformSupportedBrowsersToTargets(browserslistData),
|
|
54
|
+
includePaths: includePaths,
|
|
55
|
+
}, 'css', watch);
|
|
56
|
+
this.projectBasePath = projectBasePath;
|
|
57
|
+
this.basePath = basePath;
|
|
58
|
+
this.cssUrl = cssUrl;
|
|
59
|
+
this.includePaths = includePaths;
|
|
60
|
+
this.sass = sass;
|
|
61
|
+
this.cacheDirectory = cacheDirectory;
|
|
62
|
+
this.watch = watch;
|
|
63
|
+
}
|
|
64
|
+
destroy() {
|
|
65
|
+
void super.dispose();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return StylesheetProcessor;
|
|
69
|
+
}
|
|
70
|
+
function transformSupportedBrowsersToTargets(supportedBrowsers) {
|
|
71
|
+
const transformed = [];
|
|
72
|
+
// https://esbuild.github.io/api/#target
|
|
73
|
+
const esBuildSupportedBrowsers = new Set([
|
|
74
|
+
'safari',
|
|
75
|
+
'firefox',
|
|
76
|
+
'edge',
|
|
77
|
+
'chrome',
|
|
78
|
+
'ios',
|
|
79
|
+
]);
|
|
80
|
+
for (const browser of supportedBrowsers) {
|
|
81
|
+
let [browserName, version] = browser.split(' ');
|
|
82
|
+
// browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
|
|
83
|
+
if (browserName === 'ios_saf') {
|
|
84
|
+
browserName = 'ios';
|
|
85
|
+
}
|
|
86
|
+
// browserslist uses ranges `15.2-15.3` versions but only the lowest is required
|
|
87
|
+
// to perform minimum supported feature checks. esbuild also expects a single version.
|
|
88
|
+
[version] = version.split('-');
|
|
89
|
+
if (esBuildSupportedBrowsers.has(browserName)) {
|
|
90
|
+
if (browserName === 'safari' && version === 'tp') {
|
|
91
|
+
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since
|
|
92
|
+
// a Technology Preview (TP) of Safari is assumed to support all currently known features.
|
|
93
|
+
version = '999';
|
|
94
|
+
}
|
|
95
|
+
transformed.push(browserName + version);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return transformed.length ? transformed : undefined;
|
|
99
|
+
}
|
|
@@ -13,7 +13,7 @@ async function addLintingGenerator(tree, options) {
|
|
|
13
13
|
const tasks = [];
|
|
14
14
|
const rootProject = options.projectRoot === '.' || options.projectRoot === '';
|
|
15
15
|
const lintTask = await (0, eslint_1.lintProjectGenerator)(tree, {
|
|
16
|
-
linter:
|
|
16
|
+
linter: 'eslint',
|
|
17
17
|
project: options.projectName,
|
|
18
18
|
tsConfigPaths: [
|
|
19
19
|
(0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.app.json'),
|
|
@@ -22,7 +22,7 @@ async function addLintingGenerator(tree, options) {
|
|
|
22
22
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
23
23
|
skipFormat: true,
|
|
24
24
|
rootProject: rootProject,
|
|
25
|
-
addPlugin: false,
|
|
25
|
+
addPlugin: options.addPlugin ?? false,
|
|
26
26
|
addExplicitTargets: true,
|
|
27
27
|
skipPackageJson: options.skipPackageJson,
|
|
28
28
|
});
|
|
@@ -61,21 +61,6 @@ async function addLintingGenerator(tree, options) {
|
|
|
61
61
|
files: ['*.html'],
|
|
62
62
|
rules: {},
|
|
63
63
|
});
|
|
64
|
-
if ((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)) {
|
|
65
|
-
(0, eslint_file_1.addOverrideToLintConfig)(tree, '', {
|
|
66
|
-
files: ['*.json'],
|
|
67
|
-
parser: 'jsonc-eslint-parser',
|
|
68
|
-
rules: {
|
|
69
|
-
'@nx/dependency-checks': [
|
|
70
|
-
'error',
|
|
71
|
-
{
|
|
72
|
-
// With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
|
|
73
|
-
ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'],
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
64
|
}
|
|
80
65
|
else {
|
|
81
66
|
(0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
|
|
@@ -5,7 +5,7 @@ type EslintExtensionSchema = {
|
|
|
5
5
|
prefix: string;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
|
|
8
|
+
* @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
|
|
9
9
|
*/
|
|
10
10
|
export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
|
|
11
11
|
overrides: ({
|
|
@@ -75,7 +75,7 @@ export declare const extendAngularEslintJson: (json: Linter.Config, options: Esl
|
|
|
75
75
|
rules?: Partial<Linter.RulesRecord>;
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
|
-
* @deprecated Use {@link extendAngularEslintJson} instead
|
|
78
|
+
* @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
|
|
79
79
|
*/
|
|
80
80
|
export declare function createEsLintConfiguration(tree: Tree, options: AddLintingGeneratorSchema): void;
|
|
81
81
|
export {};
|
|
@@ -5,7 +5,7 @@ exports.createEsLintConfiguration = createEsLintConfiguration;
|
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
|
|
7
7
|
/**
|
|
8
|
-
* @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
|
|
8
|
+
* @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
|
|
9
9
|
*/
|
|
10
10
|
const extendAngularEslintJson = (json, options) => {
|
|
11
11
|
const overrides = [
|
|
@@ -53,7 +53,7 @@ const extendAngularEslintJson = (json, options) => {
|
|
|
53
53
|
};
|
|
54
54
|
exports.extendAngularEslintJson = extendAngularEslintJson;
|
|
55
55
|
/**
|
|
56
|
-
* @deprecated Use {@link extendAngularEslintJson} instead
|
|
56
|
+
* @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
|
|
57
57
|
*/
|
|
58
58
|
function createEsLintConfiguration(tree, options) {
|
|
59
59
|
const rootConfig = `${(0, devkit_1.offsetFromRoot)(options.projectRoot)}.eslintrc.json`;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import type { Schema } from './schema';
|
|
3
3
|
export declare function applicationGenerator(tree: Tree, schema: Partial<Schema>): Promise<GeneratorCallback>;
|
|
4
|
-
export declare function applicationGeneratorInternal(tree: Tree, schema: Partial<Schema>): Promise<GeneratorCallback>;
|
|
5
4
|
export default applicationGenerator;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applicationGenerator = applicationGenerator;
|
|
4
|
-
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
6
6
|
const js_1 = require("@nx/js");
|
|
7
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
8
|
const init_1 = require("../init/init");
|
|
9
|
+
const convert_to_rspack_1 = require("../convert-to-rspack/convert-to-rspack");
|
|
8
10
|
const setup_ssr_1 = require("../setup-ssr/setup-ssr");
|
|
9
11
|
const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
|
|
10
12
|
const ensure_angular_dependencies_1 = require("../utils/ensure-angular-dependencies");
|
|
11
13
|
const lib_1 = require("./lib");
|
|
12
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
13
14
|
async function applicationGenerator(tree, schema) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const options = await (0, lib_1.normalizeOptions)(tree, schema);
|
|
15
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'application');
|
|
16
|
+
const isRspack = schema.bundler === 'rspack';
|
|
17
|
+
if (isRspack) {
|
|
18
|
+
schema.bundler = 'webpack';
|
|
19
|
+
}
|
|
20
|
+
const options = await (0, lib_1.normalizeOptions)(tree, schema, isRspack);
|
|
21
21
|
const rootOffset = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
|
|
22
22
|
await (0, js_1.initGenerator)(tree, {
|
|
23
23
|
...options,
|
|
@@ -28,6 +28,7 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
28
28
|
await (0, init_1.angularInitGenerator)(tree, {
|
|
29
29
|
...options,
|
|
30
30
|
skipFormat: true,
|
|
31
|
+
addPlugin: options.addPlugin,
|
|
31
32
|
});
|
|
32
33
|
if (!options.skipPackageJson) {
|
|
33
34
|
(0, ensure_angular_dependencies_1.ensureAngularDependencies)(tree);
|
|
@@ -66,7 +67,21 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
66
67
|
project: options.name,
|
|
67
68
|
standalone: options.standalone,
|
|
68
69
|
skipPackageJson: options.skipPackageJson,
|
|
70
|
+
serverRouting: options.serverRouting,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (isRspack) {
|
|
74
|
+
await (0, convert_to_rspack_1.convertToRspack)(tree, {
|
|
75
|
+
project: options.name,
|
|
76
|
+
skipInstall: options.skipPackageJson,
|
|
77
|
+
skipFormat: true,
|
|
69
78
|
});
|
|
79
|
+
if (options.ssr) {
|
|
80
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, './files/rspack-ssr'), options.appProjectSourceRoot, {
|
|
81
|
+
pathToDistFolder: (0, devkit_1.joinPathFragments)((0, devkit_1.offsetFromRoot)(options.appProjectRoot), options.outputPath, 'browser'),
|
|
82
|
+
tmpl: '',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
70
85
|
}
|
|
71
86
|
if (!options.skipFormat) {
|
|
72
87
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
<% if(minimal) {
|
|
1
|
+
<%_ if(minimal) { _%>
|
|
2
|
+
<h1>Welcome <%= appName %></h1>
|
|
3
|
+
<%_ } else { _%>
|
|
4
|
+
<<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>>
|
|
5
|
+
<%_ } _%>
|
|
6
|
+
<%_ if(routing) { _%>
|
|
7
|
+
<router-outlet></router-outlet>
|
|
8
|
+
<%_ } _%>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Component<% if(viewEncapsulation) { %>, ViewEncapsulation<% } %> } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
selector: '<%= rootSelector %>',<% if(
|
|
4
|
+
selector: '<%= rootSelector %>',<% if (setStandaloneFalse) { %>
|
|
5
|
+
standalone: false,<% } if(!inlineTemplate) { %>
|
|
5
6
|
templateUrl: './app.component.html',<% } else { %>
|
|
6
|
-
template: `<% if(minimal) { %><h1>Welcome <%= appName %></h1><% } else { %><<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>><% } %> <% if(routing) { %><router-outlet></router-outlet><% } %>`,<% } %><% if
|
|
7
|
-
styleUrls: ['./app.component.<%= style %>'],<% } else { %>
|
|
8
|
-
styles: [``],<% } %><% } else { if(!inlineStyle) { %>
|
|
7
|
+
template: `<% if(minimal) { %><h1>Welcome <%= appName %></h1><% } else { %><<%= nxWelcomeSelector %>></<%= nxWelcomeSelector %>><% } %> <% if(routing) { %><router-outlet></router-outlet><% } %>`,<% } %><% if(!inlineStyle) { %>
|
|
9
8
|
styleUrl: './app.component.<%= style %>',<% } else { %>
|
|
10
|
-
styles: ``,<% } %><%
|
|
9
|
+
styles: ``,<% } %><% if(viewEncapsulation) { %>
|
|
11
10
|
encapsulation: ViewEncapsulation.<%= viewEncapsulation %>,<% } %>
|
|
12
11
|
})
|
|
13
12
|
export class AppComponent {<% if(!minimal) { %>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Component, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
selector: '<%= nxWelcomeSelector %>'
|
|
4
|
+
selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneFalse) { %>
|
|
5
|
+
standalone: false,<% } %>
|
|
5
6
|
template: `
|
|
6
7
|
<!--
|
|
7
8
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
@@ -2,8 +2,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
selector: '<%= nxWelcomeSelector %>'
|
|
6
|
-
standalone: true
|
|
5
|
+
selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneTrue) { %>
|
|
6
|
+
standalone: true,<% } %>
|
|
7
7
|
imports: [CommonModule],
|
|
8
8
|
template: `
|
|
9
9
|
<!--
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Component, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
selector: '<%= nxWelcomeSelector %>'
|
|
4
|
+
selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneFalse) { %>
|
|
5
|
+
standalone: false,<% } %>
|
|
5
6
|
template: `
|
|
6
7
|
<!--
|
|
7
8
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
@@ -2,8 +2,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
selector: '<%= nxWelcomeSelector %>'
|
|
6
|
-
standalone: true
|
|
5
|
+
selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneTrue) { %>
|
|
6
|
+
standalone: true,<% } %>
|
|
7
7
|
imports: [CommonModule],
|
|
8
8
|
template: `
|
|
9
9
|
<!--
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Component, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
selector: '<%= nxWelcomeSelector %>'
|
|
4
|
+
selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneFalse) { %>
|
|
5
|
+
standalone: false,<% } %>
|
|
5
6
|
template: `
|
|
6
7
|
<!--
|
|
7
8
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
@@ -2,8 +2,8 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
selector: '<%= nxWelcomeSelector %>'
|
|
6
|
-
standalone: true
|
|
5
|
+
selector: '<%= nxWelcomeSelector %>',<% if (setStandaloneTrue) { %>
|
|
6
|
+
standalone: true,<% } %>
|
|
7
7
|
imports: [CommonModule],
|
|
8
8
|
template: `
|
|
9
9
|
<!--
|