@storybook/angular 6.5.9 → 7.0.0-alpha.10
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/dist/{ts3.9 → types}/builders/build-storybook/index.d.ts +1 -1
- package/dist/types/builders/build-storybook/index.js +56 -0
- package/dist/{ts3.9 → types}/builders/build-storybook/schema.json +0 -0
- package/dist/{ts3.9 → types}/builders/builders.json +0 -0
- package/dist/{ts3.9 → types}/builders/start-storybook/index.d.ts +1 -1
- package/dist/types/builders/start-storybook/index.js +64 -0
- package/dist/{ts3.9 → types}/builders/start-storybook/schema.json +0 -0
- package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.d.ts +0 -0
- package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.js +5 -5
- package/dist/{ts3.9 → types}/builders/utils/run-compodoc.d.ts +0 -0
- package/dist/{ts3.9 → types}/builders/utils/run-compodoc.js +9 -4
- package/dist/types/builders/utils/standalone-options.d.ts +12 -0
- package/dist/{ts3.9/client/docs/types.js → types/builders/utils/standalone-options.js} +0 -0
- package/dist/{ts3.9/client/preview/angular/components → types/client/angular}/app.component.d.ts +1 -1
- package/dist/{ts3.9/client/preview/angular/components → types/client/angular}/app.component.js +5 -5
- package/dist/{ts3.9/client/preview → types/client}/angular/app.token.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular/app.token.js +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular/helpers.d.ts +1 -1
- package/dist/{ts3.9/client/preview → types/client}/angular/helpers.js +7 -7
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/AbstractRenderer.d.ts +1 -2
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/AbstractRenderer.js +40 -48
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/CanvasRenderer.d.ts +1 -2
- package/dist/types/client/angular-beta/CanvasRenderer.js +16 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/ComputesTemplateFromComponent.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/ComputesTemplateFromComponent.js +10 -8
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/DocsRenderer.d.ts +1 -2
- package/dist/types/client/angular-beta/DocsRenderer.js +41 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/RendererFactory.d.ts +0 -0
- package/dist/types/client/angular-beta/RendererFactory.js +55 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookModule.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookModule.js +18 -17
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookProvider.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookProvider.js +2 -1
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookWrapperComponent.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/StorybookWrapperComponent.js +11 -10
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgComponentAnalyzer.js +24 -13
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client}/angular-beta/utils/NgModulesAnalyzer.js +3 -2
- package/dist/{ts3.9/client/preview → types/client}/config.d.ts +1 -1
- package/dist/{ts3.9/client/preview → types/client}/config.js +1 -1
- package/dist/{ts3.9/client/preview → types/client}/decorateStory.d.ts +1 -1
- package/dist/{ts3.9/client/preview → types/client}/decorateStory.js +11 -6
- package/dist/{ts3.9/client/preview → types/client}/decorators.d.ts +1 -2
- package/dist/{ts3.9/client/preview → types/client}/decorators.js +23 -11
- package/dist/{ts3.9 → types}/client/docs/compodoc.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/docs/compodoc.js +47 -34
- package/dist/{ts3.9 → types}/client/docs/config.d.ts +3 -4
- package/dist/{ts3.9 → types}/client/docs/config.js +0 -2
- package/dist/{ts3.9 → types}/client/docs/index.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/docs/index.js +6 -2
- package/dist/{ts3.9 → types}/client/docs/sourceDecorator.d.ts +2 -2
- package/dist/{ts3.9 → types}/client/docs/sourceDecorator.js +10 -9
- package/dist/{ts3.9 → types}/client/docs/types.d.ts +0 -0
- package/dist/{ts3.9/client/preview → types/client/docs}/types.js +0 -0
- package/dist/{ts3.9/client/preview/angular-polyfills.d.ts → types/client/globals.d.ts} +0 -10
- package/dist/{ts3.9/client/preview/angular-polyfills.js → types/client/globals.js} +7 -1
- package/dist/types/client/index.d.ts +5 -0
- package/dist/types/client/index.js +25 -0
- package/dist/{ts3.9/client/preview/index.d.ts → types/client/public-api.d.ts} +2 -4
- package/dist/types/client/public-api.js +43 -0
- package/dist/{ts3.9/client/preview/types-6-0.d.ts → types/client/public-types.d.ts} +4 -19
- package/dist/{ts3.9/client/preview/types-6-0.js → types/client/public-types.js} +0 -0
- package/dist/{ts3.9/client/preview → types/client}/render.d.ts +1 -1
- package/dist/types/client/render.js +24 -0
- package/dist/{ts3.9/client/preview → types/client}/types.d.ts +13 -0
- package/dist/{ts3.9/client/preview/types-7-0.js → types/client/types.js} +0 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/{ts3.9/public_api.js → types/index.js} +8 -3
- package/dist/types/preset.d.ts +6 -0
- package/dist/types/preset.js +36 -0
- package/dist/types/renderer.d.ts +4 -0
- package/dist/{ts3.9 → types}/renderer.js +5 -4
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/nx.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/angular-cli-webpack-12.2.x.d.ts +0 -0
- package/dist/types/server/angular-cli-webpack-12.2.x.js +66 -0
- package/dist/{ts3.9 → types}/server/angular-cli-webpack-13.x.x.d.ts +0 -0
- package/dist/types/server/angular-cli-webpack-13.x.x.js +70 -0
- package/dist/types/server/angular-cli-webpack-older.d.ts +6 -0
- package/dist/types/server/angular-cli-webpack-older.js +111 -0
- package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.d.ts +6 -6
- package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.js +66 -54
- package/dist/{ts3.9 → types}/server/angular-read-workspace.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/angular-read-workspace.js +8 -14
- package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.js +1 -1
- package/dist/{ts3.9 → types}/server/framework-preset-angular-cli.d.ts +1 -1
- package/dist/types/server/framework-preset-angular-cli.js +175 -0
- package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.js +4 -3
- package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.d.ts +1 -1
- package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.js +26 -22
- package/dist/{ts3.9 → types}/server/framework-preset-angular.d.ts +0 -0
- package/dist/types/server/framework-preset-angular.js +103 -0
- package/dist/{ts3.9 → types}/server/ngx-template-loader/index.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/ngx-template-loader/index.js +0 -0
- package/dist/{ts3.9/server/options.d.ts → types/server/preset-options.d.ts} +1 -3
- package/dist/{ts3.9/types/index.js → types/server/preset-options.js} +0 -0
- package/dist/{ts3.9 → types}/server/ts_config.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/ts_config.js +0 -0
- package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.js +2 -1
- package/dist/{ts3.9 → types}/server/utils/module-is-available.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/utils/module-is-available.js +2 -1
- package/dist/{ts3.4 → types}/server/utils/normalize-asset-patterns.d.ts +7 -6
- package/dist/{ts3.9 → types}/server/utils/normalize-asset-patterns.js +9 -9
- package/dist/{ts3.9 → types}/server/utils/normalize-optimization.d.ts +1 -1
- package/dist/{ts3.9 → types}/server/utils/normalize-optimization.js +3 -2
- package/dist/types/types.d.ts +28 -0
- package/dist/types/types.js +2 -0
- package/jest.config.js +1 -0
- package/package.json +47 -57
- package/preset.js +1 -1
- package/renderer.d.ts +1 -1
- package/renderer.js +1 -1
- package/bin/build.js +0 -4
- package/bin/index.js +0 -3
- package/demo.d.ts +0 -4
- package/demo.js +0 -5
- package/dist/ts3.4/builders/build-storybook/index.d.ts +0 -15
- package/dist/ts3.4/builders/start-storybook/index.d.ts +0 -15
- package/dist/ts3.4/builders/utils/build-standalone-errors-handler.d.ts +0 -1
- package/dist/ts3.4/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/ts3.4/client/docs/compodoc.d.ts +0 -18
- package/dist/ts3.4/client/docs/config.d.ts +0 -15
- package/dist/ts3.4/client/docs/index.d.ts +0 -1
- package/dist/ts3.4/client/docs/prepareForInline.d.ts +0 -7
- package/dist/ts3.4/client/docs/sourceDecorator.d.ts +0 -9
- package/dist/ts3.4/client/docs/types.d.ts +0 -102
- package/dist/ts3.4/client/index.d.ts +0 -4
- package/dist/ts3.4/client/preview/angular/app.token.d.ts +0 -3
- package/dist/ts3.4/client/preview/angular/components/app.component.d.ts +0 -38
- package/dist/ts3.4/client/preview/angular/helpers.d.ts +0 -8
- package/dist/ts3.4/client/preview/angular-beta/AbstractRenderer.d.ts +0 -57
- package/dist/ts3.4/client/preview/angular-beta/CanvasRenderer.d.ts +0 -14
- package/dist/ts3.4/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -17
- package/dist/ts3.4/client/preview/angular-beta/DocsRenderer.d.ts +0 -14
- package/dist/ts3.4/client/preview/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/ts3.4/client/preview/angular-beta/StorybookModule.d.ts +0 -9
- package/dist/ts3.4/client/preview/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/ts3.4/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -9
- package/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -29
- package/dist/ts3.4/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/ts3.4/client/preview/angular-polyfills.d.ts +0 -41
- package/dist/ts3.4/client/preview/config.d.ts +0 -6
- package/dist/ts3.4/client/preview/decorateStory.d.ts +0 -4
- package/dist/ts3.4/client/preview/decorators.d.ts +0 -6
- package/dist/ts3.4/client/preview/globals.d.ts +0 -1
- package/dist/ts3.4/client/preview/index.d.ts +0 -25
- package/dist/ts3.4/client/preview/render.d.ts +0 -7
- package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -42
- package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.4/client/preview/types.d.ts +0 -29
- package/dist/ts3.4/demo/button.component.d.ts +0 -5
- package/dist/ts3.4/demo/welcome.component.d.ts +0 -4
- package/dist/ts3.4/public_api.d.ts +0 -1
- package/dist/ts3.4/renderer.d.ts +0 -4
- package/dist/ts3.4/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/ts3.4/server/angular-cli-webpack-12.2.x.d.ts +0 -1
- package/dist/ts3.4/server/angular-cli-webpack-13.x.x.d.ts +0 -1
- package/dist/ts3.4/server/angular-cli-webpack-older.d.ts +0 -73
- package/dist/ts3.4/server/angular-devkit-build-webpack.d.ts +0 -30
- package/dist/ts3.4/server/angular-read-workspace.d.ts +0 -13
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/create-fork-ts-checker-plugin.d.ts +0 -3
- package/dist/ts3.4/server/framework-preset-angular-cli.d.ts +0 -3
- package/dist/ts3.4/server/framework-preset-angular-docs.d.ts +0 -2
- package/dist/ts3.4/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/ts3.4/server/framework-preset-angular.d.ts +0 -5
- package/dist/ts3.4/server/index.d.ts +0 -1
- package/dist/ts3.4/server/ngx-template-loader/index.d.ts +0 -1
- package/dist/ts3.4/server/options.d.ts +0 -14
- package/dist/ts3.4/server/preset.d.ts +0 -3
- package/dist/ts3.4/server/ts_config.d.ts +0 -2
- package/dist/ts3.4/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/ts3.4/server/utils/module-is-available.d.ts +0 -1
- package/dist/ts3.4/server/utils/normalize-optimization.d.ts +0 -3
- package/dist/ts3.4/types/index.d.ts +0 -6
- package/dist/ts3.9/builders/build-storybook/index.js +0 -65
- package/dist/ts3.9/builders/start-storybook/index.js +0 -73
- package/dist/ts3.9/client/docs/prepareForInline.d.ts +0 -7
- package/dist/ts3.9/client/docs/prepareForInline.js +0 -45
- package/dist/ts3.9/client/index.d.ts +0 -4
- package/dist/ts3.9/client/index.js +0 -28
- package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.js +0 -34
- package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.js +0 -59
- package/dist/ts3.9/client/preview/angular-beta/RendererFactory.js +0 -65
- package/dist/ts3.9/client/preview/globals.d.ts +0 -1
- package/dist/ts3.9/client/preview/globals.js +0 -9
- package/dist/ts3.9/client/preview/index.js +0 -27
- package/dist/ts3.9/client/preview/render.js +0 -34
- package/dist/ts3.9/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.9/demo/button.component.d.ts +0 -5
- package/dist/ts3.9/demo/button.component.js +0 -46
- package/dist/ts3.9/demo/welcome.component.d.ts +0 -4
- package/dist/ts3.9/demo/welcome.component.js +0 -99
- package/dist/ts3.9/public_api.d.ts +0 -1
- package/dist/ts3.9/renderer.d.ts +0 -4
- package/dist/ts3.9/server/angular-cli-webpack-12.2.x.js +0 -56
- package/dist/ts3.9/server/angular-cli-webpack-13.x.x.js +0 -60
- package/dist/ts3.9/server/angular-cli-webpack-older.d.ts +0 -73
- package/dist/ts3.9/server/angular-cli-webpack-older.js +0 -110
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/build.js +0 -28
- package/dist/ts3.9/server/framework-preset-angular-cli.js +0 -177
- package/dist/ts3.9/server/framework-preset-angular.js +0 -100
- package/dist/ts3.9/server/index.d.ts +0 -1
- package/dist/ts3.9/server/index.js +0 -8
- package/dist/ts3.9/server/options.js +0 -8
- package/dist/ts3.9/server/preset.d.ts +0 -3
- package/dist/ts3.9/server/preset.js +0 -13
- package/dist/ts3.9/server/utils/normalize-asset-patterns.d.ts +0 -6
- package/dist/ts3.9/types/index.d.ts +0 -6
- package/standalone.d.ts +0 -21
- package/standalone.js +0 -8
- package/types-6-0.d.ts +0 -1
- package/types-7-0.d.ts +0 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
|
|
3
|
-
import { PresetOptions } from './options';
|
|
4
|
-
/**
|
|
5
|
-
* Old way currently support version lower than 12.2.x
|
|
6
|
-
*/
|
|
7
|
-
export declare function getWebpackConfig(baseConfig: webpack.Configuration, options: PresetOptions): Promise<webpack.Configuration | {
|
|
8
|
-
entry: any[];
|
|
9
|
-
module: {
|
|
10
|
-
rules: webpack.RuleSetRule[];
|
|
11
|
-
noParse?: RegExp | RegExp[] | ((content: string) => boolean);
|
|
12
|
-
unknownContextRequest?: string;
|
|
13
|
-
unknownContextRecursive?: boolean;
|
|
14
|
-
unknownContextRegExp?: RegExp;
|
|
15
|
-
unknownContextCritical?: boolean;
|
|
16
|
-
exprContextRequest?: string;
|
|
17
|
-
exprContextRegExp?: RegExp;
|
|
18
|
-
exprContextRecursive?: boolean;
|
|
19
|
-
exprContextCritical?: boolean;
|
|
20
|
-
wrappedContextRegExp?: RegExp;
|
|
21
|
-
wrappedContextRecursive?: boolean;
|
|
22
|
-
wrappedContextCritical?: boolean;
|
|
23
|
-
strictExportPresence?: boolean;
|
|
24
|
-
};
|
|
25
|
-
plugins: webpack.Plugin[];
|
|
26
|
-
resolve: {
|
|
27
|
-
modules: string[];
|
|
28
|
-
plugins: TsconfigPathsPlugin[];
|
|
29
|
-
descriptionFiles?: string[];
|
|
30
|
-
mainFields?: string[] | string[][];
|
|
31
|
-
aliasFields?: string[] | string[][];
|
|
32
|
-
mainFiles?: string[];
|
|
33
|
-
extensions?: string[];
|
|
34
|
-
enforceExtension?: boolean;
|
|
35
|
-
alias?: {
|
|
36
|
-
[key: string]: string;
|
|
37
|
-
};
|
|
38
|
-
unsafeCache?: boolean | {};
|
|
39
|
-
cachePredicate?(data: {
|
|
40
|
-
path: string;
|
|
41
|
-
request: string;
|
|
42
|
-
}): boolean;
|
|
43
|
-
symlinks?: boolean;
|
|
44
|
-
cacheWithContext?: boolean;
|
|
45
|
-
roots?: string[];
|
|
46
|
-
};
|
|
47
|
-
resolveLoader: webpack.ResolveLoader;
|
|
48
|
-
mode?: "development" | "production" | "none";
|
|
49
|
-
name?: string;
|
|
50
|
-
context?: string;
|
|
51
|
-
devtool?: string | boolean;
|
|
52
|
-
output?: webpack.Output;
|
|
53
|
-
externals?: string | RegExp | webpack.ExternalsObjectElement | webpack.ExternalsFunctionElement | webpack.ExternalsElement[];
|
|
54
|
-
target?: "node" | "web" | "webworker" | "async-node" | "node-webkit" | "atom" | "electron" | "electron-renderer" | "electron-preload" | "electron-main" | ((compiler?: any) => void);
|
|
55
|
-
bail?: boolean;
|
|
56
|
-
profile?: boolean;
|
|
57
|
-
cache?: boolean | object;
|
|
58
|
-
watch?: boolean;
|
|
59
|
-
watchOptions?: webpack.ICompiler.WatchOptions;
|
|
60
|
-
node?: false | webpack.Node;
|
|
61
|
-
amd?: {
|
|
62
|
-
[moduleName: string]: boolean;
|
|
63
|
-
};
|
|
64
|
-
recordsPath?: string;
|
|
65
|
-
recordsInputPath?: string;
|
|
66
|
-
recordsOutputPath?: string;
|
|
67
|
-
stats?: webpack.Stats.ToStringOptions;
|
|
68
|
-
performance?: false | webpack.Options.Performance;
|
|
69
|
-
parallelism?: number;
|
|
70
|
-
optimization?: webpack.Options.Optimization;
|
|
71
|
-
infrastructureLogging?: webpack.Options.InfrastructureLogging;
|
|
72
|
-
devServer?: import("webpack-dev-server").Configuration;
|
|
73
|
-
}>;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.getWebpackConfig = void 0;
|
|
16
|
-
const node_logger_1 = require("@storybook/node-logger");
|
|
17
|
-
const tsconfig_paths_webpack_plugin_1 = __importDefault(require("tsconfig-paths-webpack-plugin"));
|
|
18
|
-
const architect_1 = require("@angular-devkit/architect");
|
|
19
|
-
const angular_read_workspace_1 = require("./angular-read-workspace");
|
|
20
|
-
const angular_devkit_build_webpack_1 = require("./angular-devkit-build-webpack");
|
|
21
|
-
const filter_out_styling_rules_1 = require("./utils/filter-out-styling-rules");
|
|
22
|
-
/**
|
|
23
|
-
* Old way currently support version lower than 12.2.x
|
|
24
|
-
*/
|
|
25
|
-
function getWebpackConfig(baseConfig, options) {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const dirToSearch = process.cwd();
|
|
28
|
-
// Read angular workspace
|
|
29
|
-
let workspaceConfig;
|
|
30
|
-
try {
|
|
31
|
-
workspaceConfig = yield angular_read_workspace_1.readAngularWorkspaceConfig(dirToSearch);
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
node_logger_1.logger.error(`=> Could not find angular workspace config (angular.json) on this path "${dirToSearch}"`);
|
|
35
|
-
node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
|
|
36
|
-
return baseConfig;
|
|
37
|
-
}
|
|
38
|
-
// Find angular project target
|
|
39
|
-
let project;
|
|
40
|
-
let target;
|
|
41
|
-
let confName;
|
|
42
|
-
try {
|
|
43
|
-
// Default behavior when `angularBrowserTarget` are not explicitly defined to null
|
|
44
|
-
if (options.angularBrowserTarget !== null) {
|
|
45
|
-
const browserTarget = options.angularBrowserTarget
|
|
46
|
-
? architect_1.targetFromTargetString(options.angularBrowserTarget)
|
|
47
|
-
: {
|
|
48
|
-
configuration: undefined,
|
|
49
|
-
project: angular_read_workspace_1.getDefaultProjectName(workspaceConfig),
|
|
50
|
-
target: 'build',
|
|
51
|
-
};
|
|
52
|
-
const fondProject = angular_read_workspace_1.findAngularProjectTarget(workspaceConfig, browserTarget.project, browserTarget.target);
|
|
53
|
-
project = fondProject.project;
|
|
54
|
-
target = fondProject.target;
|
|
55
|
-
confName = browserTarget.configuration;
|
|
56
|
-
node_logger_1.logger.info(`=> Using angular project "${browserTarget.project}:${browserTarget.target}${confName ? `:${confName}` : ''}" for configuring Storybook`);
|
|
57
|
-
}
|
|
58
|
-
// Start storybook when only tsConfig is provided.
|
|
59
|
-
if (options.angularBrowserTarget === null && options.tsConfig) {
|
|
60
|
-
node_logger_1.logger.info(`=> Using default angular project with "tsConfig:${options.tsConfig}"`);
|
|
61
|
-
project = { root: '', extensions: {}, targets: undefined };
|
|
62
|
-
target = { builder: '', options: { tsConfig: options.tsConfig } };
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
node_logger_1.logger.error(`=> Could not find angular project: ${error.message}`);
|
|
67
|
-
node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
|
|
68
|
-
return baseConfig;
|
|
69
|
-
}
|
|
70
|
-
// Use angular-cli to get some webpack config
|
|
71
|
-
let angularCliWebpackConfig;
|
|
72
|
-
try {
|
|
73
|
-
angularCliWebpackConfig = yield angular_devkit_build_webpack_1.extractAngularCliWebpackConfig(dirToSearch, project, target, confName);
|
|
74
|
-
node_logger_1.logger.info(`=> Using angular-cli webpack config`);
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
node_logger_1.logger.error(`=> Could not get angular cli webpack config`);
|
|
78
|
-
throw error;
|
|
79
|
-
}
|
|
80
|
-
return mergeAngularCliWebpackConfig(angularCliWebpackConfig, baseConfig);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
exports.getWebpackConfig = getWebpackConfig;
|
|
84
|
-
function mergeAngularCliWebpackConfig({ cliCommonWebpackConfig, cliStyleWebpackConfig, tsConfigPath }, baseConfig) {
|
|
85
|
-
// Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
|
|
86
|
-
// because @angular-devkit/build-angular created rules have include/exclude for global style files.
|
|
87
|
-
const rulesExcludingStyles = filter_out_styling_rules_1.filterOutStylingRules(baseConfig);
|
|
88
|
-
// styleWebpackConfig.entry adds global style files to the webpack context
|
|
89
|
-
const entry = [
|
|
90
|
-
...baseConfig.entry,
|
|
91
|
-
...Object.values(cliStyleWebpackConfig.entry).reduce((acc, item) => acc.concat(item), []),
|
|
92
|
-
];
|
|
93
|
-
const module = Object.assign(Object.assign({}, baseConfig.module), { rules: [...cliStyleWebpackConfig.module.rules, ...rulesExcludingStyles] });
|
|
94
|
-
// We use cliCommonConfig plugins to serve static assets files.
|
|
95
|
-
const plugins = [
|
|
96
|
-
...cliStyleWebpackConfig.plugins,
|
|
97
|
-
...cliCommonWebpackConfig.plugins,
|
|
98
|
-
...baseConfig.plugins,
|
|
99
|
-
];
|
|
100
|
-
const resolve = Object.assign(Object.assign({}, baseConfig.resolve), { modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliCommonWebpackConfig.resolve.modules])), plugins: [
|
|
101
|
-
new tsconfig_paths_webpack_plugin_1.default({
|
|
102
|
-
configFile: tsConfigPath,
|
|
103
|
-
mainFields: ['browser', 'module', 'main'],
|
|
104
|
-
}),
|
|
105
|
-
] });
|
|
106
|
-
return Object.assign(Object.assign({}, baseConfig), { entry,
|
|
107
|
-
module,
|
|
108
|
-
plugins,
|
|
109
|
-
resolve, resolveLoader: cliCommonWebpackConfig.resolveLoader });
|
|
110
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const server_1 = require("@storybook/core/server");
|
|
16
|
-
const node_logger_1 = require("@storybook/node-logger");
|
|
17
|
-
const options_1 = __importDefault(require("./options"));
|
|
18
|
-
function build() {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
try {
|
|
21
|
-
yield server_1.buildStatic(options_1.default);
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
node_logger_1.logger.error(error);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
build();
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
-
};
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.webpackFinal = void 0;
|
|
35
|
-
const node_logger_1 = require("@storybook/node-logger");
|
|
36
|
-
const architect_1 = require("@angular-devkit/architect");
|
|
37
|
-
const find_up_1 = require("find-up");
|
|
38
|
-
const semver_1 = __importDefault(require("@storybook/semver"));
|
|
39
|
-
const ts_dedent_1 = __importDefault(require("ts-dedent"));
|
|
40
|
-
const core_1 = require("@angular-devkit/core");
|
|
41
|
-
const module_is_available_1 = require("./utils/module-is-available");
|
|
42
|
-
const angular_cli_webpack_12_2_x_1 = require("./angular-cli-webpack-12.2.x");
|
|
43
|
-
const angular_cli_webpack_13_x_x_1 = require("./angular-cli-webpack-13.x.x");
|
|
44
|
-
const angular_cli_webpack_older_1 = require("./angular-cli-webpack-older");
|
|
45
|
-
const angular_read_workspace_1 = require("./angular-read-workspace");
|
|
46
|
-
function webpackFinal(baseConfig, options) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
if (!module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular')) {
|
|
49
|
-
node_logger_1.logger.info('=> Using base config because "@angular-devkit/build-angular" is not installed');
|
|
50
|
-
return baseConfig;
|
|
51
|
-
}
|
|
52
|
-
const angularCliVersion = yield Promise.resolve().then(() => __importStar(require('@angular/cli'))).then((m) => semver_1.default.coerce(m.VERSION.full));
|
|
53
|
-
/**
|
|
54
|
-
* Ordered array to use the specific getWebpackConfig according to some condition like angular-cli version
|
|
55
|
-
*/
|
|
56
|
-
const webpackGetterByVersions = [
|
|
57
|
-
{
|
|
58
|
-
info: '=> Loading angular-cli config for angular >= 13.0.0',
|
|
59
|
-
condition: semver_1.default.satisfies(angularCliVersion, '>=13.0.0'),
|
|
60
|
-
getWebpackConfig: (_baseConfig, _options) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const builderContext = getBuilderContext(_options);
|
|
62
|
-
const builderOptions = yield getBuilderOptions(_options, builderContext);
|
|
63
|
-
const legacyDefaultOptions = yield getLegacyDefaultBuildOptions(_options);
|
|
64
|
-
return angular_cli_webpack_13_x_x_1.getWebpackConfig(_baseConfig, {
|
|
65
|
-
builderOptions: Object.assign(Object.assign({ watch: options.configType === 'DEVELOPMENT' }, legacyDefaultOptions), builderOptions),
|
|
66
|
-
builderContext,
|
|
67
|
-
});
|
|
68
|
-
}),
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
info: '=> Loading angular-cli config for angular 12.2.x',
|
|
72
|
-
condition: semver_1.default.satisfies(angularCliVersion, '12.2.x') && options.angularBuilderContext,
|
|
73
|
-
getWebpackConfig: (_baseConfig, _options) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const builderContext = getBuilderContext(_options);
|
|
75
|
-
const builderOptions = yield getBuilderOptions(_options, builderContext);
|
|
76
|
-
return angular_cli_webpack_12_2_x_1.getWebpackConfig(_baseConfig, {
|
|
77
|
-
builderOptions,
|
|
78
|
-
builderContext,
|
|
79
|
-
});
|
|
80
|
-
}),
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
info: '=> Loading angular-cli config for angular lower than 12.2.0',
|
|
84
|
-
condition: true,
|
|
85
|
-
getWebpackConfig: angular_cli_webpack_older_1.getWebpackConfig,
|
|
86
|
-
},
|
|
87
|
-
];
|
|
88
|
-
const webpackGetter = webpackGetterByVersions.find((wg) => wg.condition);
|
|
89
|
-
node_logger_1.logger.info(webpackGetter.info);
|
|
90
|
-
return Promise.resolve(webpackGetter.getWebpackConfig(baseConfig, options));
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
exports.webpackFinal = webpackFinal;
|
|
94
|
-
/**
|
|
95
|
-
* Get Builder Context
|
|
96
|
-
* If storybook is not start by angular builder create dumb BuilderContext
|
|
97
|
-
*/
|
|
98
|
-
function getBuilderContext(options) {
|
|
99
|
-
var _a;
|
|
100
|
-
return ((_a = options.angularBuilderContext) !== null && _a !== void 0 ? _a : {
|
|
101
|
-
target: { project: 'noop-project', builder: '', options: {} },
|
|
102
|
-
workspaceRoot: process.cwd(),
|
|
103
|
-
getProjectMetadata: () => ({}),
|
|
104
|
-
getTargetOptions: () => ({}),
|
|
105
|
-
logger: new core_1.logging.Logger('Storybook'),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Get builder options
|
|
110
|
-
* Merge target options from browser target and from storybook options
|
|
111
|
-
*/
|
|
112
|
-
function getBuilderOptions(options, builderContext) {
|
|
113
|
-
var _a, _b;
|
|
114
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
/**
|
|
116
|
-
* Get Browser Target options
|
|
117
|
-
*/
|
|
118
|
-
let browserTargetOptions = {};
|
|
119
|
-
if (options.angularBrowserTarget) {
|
|
120
|
-
const browserTarget = architect_1.targetFromTargetString(options.angularBrowserTarget);
|
|
121
|
-
node_logger_1.logger.info(`=> Using angular browser target options from "${browserTarget.project}:${browserTarget.target}${browserTarget.configuration ? `:${browserTarget.configuration}` : ''}"`);
|
|
122
|
-
browserTargetOptions = yield builderContext.getTargetOptions(browserTarget);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Merge target options from browser target options and from storybook options
|
|
126
|
-
*/
|
|
127
|
-
const builderOptions = Object.assign(Object.assign(Object.assign({}, browserTargetOptions), options.angularBuilderOptions), { tsConfig: (_b = (_a = options.tsConfig) !== null && _a !== void 0 ? _a : find_up_1.sync('tsconfig.json', { cwd: options.configDir })) !== null && _b !== void 0 ? _b : browserTargetOptions.tsConfig });
|
|
128
|
-
node_logger_1.logger.info(`=> Using angular project with "tsConfig:${builderOptions.tsConfig}"`);
|
|
129
|
-
return builderOptions;
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Get options from legacy way
|
|
134
|
-
* /!\ This is only for backward compatibility and would be removed on Storybook 7.0
|
|
135
|
-
* only work for angular.json with [defaultProject].build or "storybook.build" config
|
|
136
|
-
*/
|
|
137
|
-
function getLegacyDefaultBuildOptions(options) {
|
|
138
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
-
if (options.angularBrowserTarget !== undefined) {
|
|
140
|
-
// Not use legacy way with builder (`angularBrowserTarget` is defined or null with builder and undefined without)
|
|
141
|
-
return {};
|
|
142
|
-
}
|
|
143
|
-
node_logger_1.logger.warn(ts_dedent_1.default `Your Storybook startup uses a solution that will not be supported in version 7.0.
|
|
144
|
-
You must use angular builder to have an explicit configuration on the project used in angular.json
|
|
145
|
-
Read more at:
|
|
146
|
-
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sb-angular-builder)
|
|
147
|
-
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular13)
|
|
148
|
-
`);
|
|
149
|
-
const dirToSearch = process.cwd();
|
|
150
|
-
// Read angular workspace
|
|
151
|
-
let workspaceConfig;
|
|
152
|
-
try {
|
|
153
|
-
workspaceConfig = yield angular_read_workspace_1.readAngularWorkspaceConfig(dirToSearch);
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
node_logger_1.logger.error(`=> Could not find angular workspace config (angular.json) on this path "${dirToSearch}"`);
|
|
157
|
-
node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
|
|
158
|
-
return {};
|
|
159
|
-
}
|
|
160
|
-
// Find angular project target
|
|
161
|
-
try {
|
|
162
|
-
const browserTarget = {
|
|
163
|
-
configuration: undefined,
|
|
164
|
-
project: angular_read_workspace_1.getDefaultProjectName(workspaceConfig),
|
|
165
|
-
target: 'build',
|
|
166
|
-
};
|
|
167
|
-
const { target, project } = angular_read_workspace_1.findAngularProjectTarget(workspaceConfig, browserTarget.project, browserTarget.target);
|
|
168
|
-
node_logger_1.logger.info(`=> Using angular project "${browserTarget.project}:${browserTarget.target}" for configuring Storybook`);
|
|
169
|
-
return Object.assign({}, target.options);
|
|
170
|
-
}
|
|
171
|
-
catch (error) {
|
|
172
|
-
node_logger_1.logger.error(`=> Could not find angular project: ${error.message}`);
|
|
173
|
-
node_logger_1.logger.info(`=> Fail to load angular-cli config. Using base config`);
|
|
174
|
-
return {};
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
-
};
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.webpack = void 0;
|
|
35
|
-
const path_1 = __importDefault(require("path"));
|
|
36
|
-
const semver_1 = __importDefault(require("@storybook/semver"));
|
|
37
|
-
const webpack_1 = require("webpack");
|
|
38
|
-
const autoprefixer_1 = __importDefault(require("autoprefixer"));
|
|
39
|
-
const ts_config_1 = __importDefault(require("./ts_config"));
|
|
40
|
-
const create_fork_ts_checker_plugin_1 = __importDefault(require("./create-fork-ts-checker-plugin"));
|
|
41
|
-
function webpack(config, { configDir, angularBuilderContext }) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
try {
|
|
44
|
-
// Disable all this webpack stuff if we use angular-cli >= 12
|
|
45
|
-
// Angular cli is in charge of doing all the necessary for angular. If there is any additional configuration to add, it must be done in the preset angular-cli versioned.
|
|
46
|
-
const angularCliVersion = yield Promise.resolve().then(() => __importStar(require('@angular/cli'))).then((m) => semver_1.default.coerce(m.VERSION.full));
|
|
47
|
-
if ((semver_1.default.satisfies(angularCliVersion, '12.2.x') && angularBuilderContext) ||
|
|
48
|
-
semver_1.default.satisfies(angularCliVersion, '>=13.0.0')) {
|
|
49
|
-
return config;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
// do nothing, continue
|
|
54
|
-
}
|
|
55
|
-
const tsLoaderOptions = ts_config_1.default(configDir);
|
|
56
|
-
return Object.assign(Object.assign({}, config), { module: Object.assign(Object.assign({}, config.module), { rules: [
|
|
57
|
-
...config.module.rules,
|
|
58
|
-
{
|
|
59
|
-
test: /\.tsx?$/,
|
|
60
|
-
use: [
|
|
61
|
-
{
|
|
62
|
-
loader: require.resolve('ts-loader'),
|
|
63
|
-
options: tsLoaderOptions,
|
|
64
|
-
},
|
|
65
|
-
{ loader: path_1.default.resolve(__dirname, 'ngx-template-loader') },
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
test: /[/\\]@angular[/\\]core[/\\].+\.js$/,
|
|
70
|
-
parser: { system: true },
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
test: /\.html$/,
|
|
74
|
-
loader: require.resolve('raw-loader'),
|
|
75
|
-
exclude: /\.async\.html$/,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
test: /\.s(c|a)ss$/,
|
|
79
|
-
use: [
|
|
80
|
-
{ loader: require.resolve('raw-loader') },
|
|
81
|
-
{
|
|
82
|
-
loader: require.resolve('postcss-loader'),
|
|
83
|
-
options: {
|
|
84
|
-
postcssOptions: {
|
|
85
|
-
plugins: [autoprefixer_1.default()],
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
{ loader: require.resolve('sass-loader') },
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
] }), resolve: Object.assign({}, config.resolve), plugins: [
|
|
93
|
-
...config.plugins,
|
|
94
|
-
// See https://github.com/angular/angular/issues/11580#issuecomment-401127742
|
|
95
|
-
new webpack_1.ContextReplacementPlugin(/@angular(\\|\/)core(\\|\/)(fesm5|bundles)/, path_1.default.resolve(__dirname, '..')),
|
|
96
|
-
create_fork_ts_checker_plugin_1.default(tsLoaderOptions),
|
|
97
|
-
] });
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
exports.webpack = webpack;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const server_1 = require("@storybook/core/server");
|
|
7
|
-
const options_1 = __importDefault(require("./options"));
|
|
8
|
-
server_1.buildDev(options_1.default);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const read_pkg_up_1 = require("read-pkg-up");
|
|
4
|
-
exports.default = {
|
|
5
|
-
packageJson: read_pkg_up_1.sync({ cwd: __dirname }).packageJson,
|
|
6
|
-
framework: 'angular',
|
|
7
|
-
frameworkPresets: [require.resolve('./preset')],
|
|
8
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addons = exports.previewAnnotations = void 0;
|
|
4
|
-
exports.previewAnnotations = (entries = []) => [
|
|
5
|
-
...entries,
|
|
6
|
-
require.resolve('../client/preview/config'),
|
|
7
|
-
];
|
|
8
|
-
exports.addons = [
|
|
9
|
-
require.resolve('./framework-preset-angular'),
|
|
10
|
-
require.resolve('./framework-preset-angular-cli'),
|
|
11
|
-
require.resolve('./framework-preset-angular-ivy'),
|
|
12
|
-
require.resolve('./framework-preset-angular-docs'),
|
|
13
|
-
];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseException, Path } from '@angular-devkit/core';
|
|
2
|
-
import { AssetPattern, AssetPatternClass } from '@angular-devkit/build-angular/src/browser/schema';
|
|
3
|
-
export declare class MissingAssetSourceRootException extends BaseException {
|
|
4
|
-
constructor(path: string);
|
|
5
|
-
}
|
|
6
|
-
export declare function normalizeAssetPatterns(assetPatterns: AssetPattern[], root: Path, projectRoot: Path, maybeSourceRoot: Path | undefined): AssetPatternClass[];
|
package/standalone.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { CLIOptions, LoadOptions, BuilderOptions } from '@storybook/core-common';
|
|
2
|
-
import type { BuilderContext } from '@angular-devkit/architect';
|
|
3
|
-
|
|
4
|
-
export type StandaloneOptions = Partial<
|
|
5
|
-
CLIOptions &
|
|
6
|
-
LoadOptions &
|
|
7
|
-
BuilderOptions & {
|
|
8
|
-
mode?: 'static' | 'dev';
|
|
9
|
-
angularBrowserTarget?: string | null;
|
|
10
|
-
angularBuilderOptions?: Record<string, any> & {
|
|
11
|
-
styles?: any[];
|
|
12
|
-
stylePreprocessorOptions?: any;
|
|
13
|
-
};
|
|
14
|
-
angularBuilderContext?: BuilderContext | null;
|
|
15
|
-
tsConfig?: string;
|
|
16
|
-
}
|
|
17
|
-
>;
|
|
18
|
-
|
|
19
|
-
declare module '@storybook/angular/standalone' {
|
|
20
|
-
export default function buildStandalone(options: StandaloneOptions): Promise<unknown>;
|
|
21
|
-
}
|
package/standalone.js
DELETED
package/types-6-0.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/ts3.9/client/preview/types-6-0.d';
|
package/types-7-0.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/ts3.9/client/preview/types-7-0.d';
|