@storybook/angular 9.1.0-alpha.0 → 9.1.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/build-schema.json +199 -0
- package/builders.json +14 -0
- package/dist/builders/build-storybook/index.js +31 -80
- package/dist/builders/start-storybook/index.js +31 -101
- package/dist/chunk-CUDJAP6K.mjs +3 -0
- package/dist/chunk-KMSSK3DZ.mjs +6 -0
- package/dist/chunk-LXSTVAFF.mjs +40 -0
- package/dist/client/config.d.ts +20 -6
- package/dist/client/config.js +49 -20
- package/dist/client/config.mjs +10 -13
- package/dist/client/docs/config.d.ts +6 -3
- package/dist/client/docs/config.js +18 -14
- package/dist/client/docs/config.mjs +6 -10
- package/dist/client/index.d.ts +144 -6
- package/dist/client/index.js +47 -30
- package/dist/client/index.mjs +3 -9
- package/dist/client/preview-prod.d.ts +2 -1
- package/dist/client/preview-prod.js +5 -4
- package/dist/client/preview-prod.mjs +1 -0
- package/dist/index.d.ts +59 -2
- package/dist/index.js +47 -29
- package/dist/index.mjs +3 -13
- package/dist/preset.js +8 -38
- package/dist/server/framework-preset-angular-cli.js +20 -83
- package/dist/server/framework-preset-angular-ivy.js +6 -59
- package/dist/{client/types.d.ts → types-3b0b7107.d.ts} +9 -9
- package/package.json +71 -24
- package/start-schema.json +234 -0
- package/dist/builders/build-storybook/index.d.ts +0 -25
- package/dist/builders/build-storybook/index.mjs +0 -78
- package/dist/builders/build-storybook/index.spec.d.ts +0 -1
- package/dist/builders/build-storybook/index.spec.js +0 -222
- package/dist/builders/build-storybook/index.spec.mjs +0 -187
- package/dist/builders/build-storybook/schema.json +0 -199
- package/dist/builders/builders.json +0 -14
- package/dist/builders/start-storybook/index.d.ts +0 -21
- package/dist/builders/start-storybook/index.mjs +0 -99
- package/dist/builders/start-storybook/index.spec.d.ts +0 -1
- package/dist/builders/start-storybook/index.spec.js +0 -188
- package/dist/builders/start-storybook/index.spec.mjs +0 -186
- package/dist/builders/start-storybook/schema.json +0 -234
- package/dist/builders/utils/error-handler.d.ts +0 -2
- package/dist/builders/utils/error-handler.js +0 -38
- package/dist/builders/utils/error-handler.mjs +0 -33
- package/dist/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/builders/utils/run-compodoc.js +0 -35
- package/dist/builders/utils/run-compodoc.mjs +0 -31
- package/dist/builders/utils/run-compodoc.spec.d.ts +0 -1
- package/dist/builders/utils/run-compodoc.spec.js +0 -76
- package/dist/builders/utils/run-compodoc.spec.mjs +0 -74
- package/dist/builders/utils/standalone-options.d.ts +0 -18
- package/dist/builders/utils/standalone-options.js +0 -2
- package/dist/builders/utils/standalone-options.mjs +0 -1
- package/dist/client/angular-beta/AbstractRenderer.d.ts +0 -75
- package/dist/client/angular-beta/AbstractRenderer.js +0 -201
- package/dist/client/angular-beta/AbstractRenderer.mjs +0 -164
- package/dist/client/angular-beta/CanvasRenderer.d.ts +0 -12
- package/dist/client/angular-beta/CanvasRenderer.js +0 -13
- package/dist/client/angular-beta/CanvasRenderer.mjs +0 -9
- package/dist/client/angular-beta/ComputesTemplateFromComponent.d.ts +0 -24
- package/dist/client/angular-beta/ComputesTemplateFromComponent.js +0 -160
- package/dist/client/angular-beta/ComputesTemplateFromComponent.mjs +0 -154
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.d.ts +0 -1
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.js +0 -730
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.mjs +0 -728
- package/dist/client/angular-beta/DocsRenderer.d.ts +0 -13
- package/dist/client/angular-beta/DocsRenderer.js +0 -39
- package/dist/client/angular-beta/DocsRenderer.mjs +0 -35
- package/dist/client/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/client/angular-beta/RendererFactory.js +0 -56
- package/dist/client/angular-beta/RendererFactory.mjs +0 -50
- package/dist/client/angular-beta/RendererFactory.test.d.ts +0 -1
- package/dist/client/angular-beta/RendererFactory.test.js +0 -235
- package/dist/client/angular-beta/RendererFactory.test.mjs +0 -233
- package/dist/client/angular-beta/StorybookModule.d.ts +0 -8
- package/dist/client/angular-beta/StorybookModule.js +0 -27
- package/dist/client/angular-beta/StorybookModule.mjs +0 -23
- package/dist/client/angular-beta/StorybookModule.test.d.ts +0 -1
- package/dist/client/angular-beta/StorybookModule.test.js +0 -321
- package/dist/client/angular-beta/StorybookModule.test.mjs +0 -319
- package/dist/client/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/client/angular-beta/StorybookProvider.js +0 -26
- package/dist/client/angular-beta/StorybookProvider.mjs +0 -22
- package/dist/client/angular-beta/StorybookWrapperComponent.d.ts +0 -13
- package/dist/client/angular-beta/StorybookWrapperComponent.js +0 -127
- package/dist/client/angular-beta/StorybookWrapperComponent.mjs +0 -123
- package/dist/client/angular-beta/__testfixtures__/input.component.d.ts +0 -29
- package/dist/client/angular-beta/__testfixtures__/input.component.js +0 -76
- package/dist/client/angular-beta/__testfixtures__/input.component.mjs +0 -73
- package/dist/client/angular-beta/__testfixtures__/test.module.d.ts +0 -2
- package/dist/client/angular-beta/__testfixtures__/test.module.js +0 -20
- package/dist/client/angular-beta/__testfixtures__/test.module.mjs +0 -17
- package/dist/client/angular-beta/utils/BootstrapQueue.d.ts +0 -12
- package/dist/client/angular-beta/utils/BootstrapQueue.js +0 -86
- package/dist/client/angular-beta/utils/BootstrapQueue.mjs +0 -49
- package/dist/client/angular-beta/utils/BootstrapQueue.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/BootstrapQueue.test.js +0 -164
- package/dist/client/angular-beta/utils/BootstrapQueue.test.mjs +0 -162
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -22
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.js +0 -93
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.mjs +0 -84
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.js +0 -388
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.mjs +0 -386
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.js +0 -41
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.mjs +0 -37
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.js +0 -24
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.mjs +0 -22
- package/dist/client/angular-beta/utils/PropertyExtractor.d.ts +0 -30
- package/dist/client/angular-beta/utils/PropertyExtractor.js +0 -196
- package/dist/client/angular-beta/utils/PropertyExtractor.mjs +0 -158
- package/dist/client/angular-beta/utils/PropertyExtractor.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/PropertyExtractor.test.js +0 -177
- package/dist/client/angular-beta/utils/PropertyExtractor.test.mjs +0 -175
- package/dist/client/angular-beta/utils/StoryUID.d.ts +0 -22
- package/dist/client/angular-beta/utils/StoryUID.js +0 -43
- package/dist/client/angular-beta/utils/StoryUID.mjs +0 -38
- package/dist/client/argsToTemplate.d.ts +0 -56
- package/dist/client/argsToTemplate.js +0 -58
- package/dist/client/argsToTemplate.mjs +0 -55
- package/dist/client/argsToTemplate.test.d.ts +0 -1
- package/dist/client/argsToTemplate.test.js +0 -102
- package/dist/client/argsToTemplate.test.mjs +0 -100
- package/dist/client/compodoc-types.d.ts +0 -102
- package/dist/client/compodoc-types.js +0 -2
- package/dist/client/compodoc-types.mjs +0 -1
- package/dist/client/compodoc.d.ts +0 -12
- package/dist/client/compodoc.js +0 -261
- package/dist/client/compodoc.mjs +0 -248
- package/dist/client/compodoc.test.d.ts +0 -1
- package/dist/client/compodoc.test.js +0 -132
- package/dist/client/compodoc.test.mjs +0 -130
- package/dist/client/decorateStory.d.ts +0 -4
- package/dist/client/decorateStory.js +0 -48
- package/dist/client/decorateStory.mjs +0 -45
- package/dist/client/decorateStory.test.d.ts +0 -1
- package/dist/client/decorateStory.test.js +0 -306
- package/dist/client/decorateStory.test.mjs +0 -301
- package/dist/client/decorators.d.ts +0 -13
- package/dist/client/decorators.js +0 -69
- package/dist/client/decorators.mjs +0 -63
- package/dist/client/decorators.test.d.ts +0 -1
- package/dist/client/decorators.test.js +0 -159
- package/dist/client/decorators.test.mjs +0 -157
- package/dist/client/docs/__testfixtures__/doc-button/input.d.ts +0 -110
- package/dist/client/docs/__testfixtures__/doc-button/input.js +0 -204
- package/dist/client/docs/__testfixtures__/doc-button/input.mjs +0 -201
- package/dist/client/docs/__testfixtures__/doc-button/tsconfig.json +0 -7
- package/dist/client/docs/angular-properties.test.d.ts +0 -1
- package/dist/client/docs/angular-properties.test.js +0 -36
- package/dist/client/docs/angular-properties.test.mjs +0 -34
- package/dist/client/docs/sourceDecorator.d.ts +0 -10
- package/dist/client/docs/sourceDecorator.js +0 -53
- package/dist/client/docs/sourceDecorator.mjs +0 -48
- package/dist/client/globals.d.ts +0 -1
- package/dist/client/globals.js +0 -33
- package/dist/client/globals.mjs +0 -31
- package/dist/client/portable-stories.d.ts +0 -23
- package/dist/client/portable-stories.js +0 -62
- package/dist/client/portable-stories.mjs +0 -26
- package/dist/client/public-types.d.ts +0 -54
- package/dist/client/public-types.js +0 -2
- package/dist/client/public-types.mjs +0 -1
- package/dist/client/render.d.ts +0 -7
- package/dist/client/render.js +0 -19
- package/dist/client/render.mjs +0 -14
- package/dist/client/types.js +0 -2
- package/dist/client/types.mjs +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.js +0 -6
- package/dist/node/index.mjs +0 -3
- package/dist/preset.d.ts +0 -5
- package/dist/preset.mjs +0 -34
- package/dist/renderer.d.ts +0 -6
- package/dist/renderer.js +0 -15
- package/dist/renderer.mjs +0 -6
- package/dist/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -4
- package/dist/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/some-config/angular.json +0 -19
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -64
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-lib/angular.json +0 -28
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -20
- package/dist/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-nx/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-nx/nx.json +0 -3
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -8
- package/dist/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -14
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -3
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -8
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -14
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -5
- package/dist/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -11
- package/dist/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -7
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -3
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -20
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -16
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -13
- package/dist/server/__tests__/angular.json +0 -96
- package/dist/server/angular-cli-webpack.d.ts +0 -1
- package/dist/server/angular-cli-webpack.js +0 -80
- package/dist/server/angular-cli-webpack.mjs +0 -80
- package/dist/server/framework-preset-angular-cli.d.ts +0 -3
- package/dist/server/framework-preset-angular-cli.mjs +0 -81
- package/dist/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/server/framework-preset-angular-ivy.mjs +0 -56
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.d.ts +0 -12
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.js +0 -55
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.mjs +0 -52
- package/dist/server/preset-options.d.ts +0 -9
- package/dist/server/preset-options.js +0 -2
- package/dist/server/preset-options.mjs +0 -1
- package/dist/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/server/utils/filter-out-styling-rules.js +0 -17
- package/dist/server/utils/filter-out-styling-rules.mjs +0 -13
- package/dist/server/utils/module-is-available.d.ts +0 -1
- package/dist/server/utils/module-is-available.js +0 -13
- package/dist/server/utils/module-is-available.mjs +0 -9
- package/dist/test-setup.d.ts +0 -1
- package/dist/test-setup.js +0 -6
- package/dist/test-setup.mjs +0 -4
- package/dist/types.d.ts +0 -27
- package/dist/types.js +0 -2
- package/dist/types.mjs +0 -1
- package/scripts/postbuild.js +0 -17
- package/template/cli/.eslintrc.json +0 -5
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"title": "Start Storybook",
|
|
4
|
-
"description": "Serve up storybook in development mode.",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"browserTarget": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Build target to be served in project-name:builder:config format. Should generally target on the builder: '@angular-devkit/build-angular:browser'. Useful for Storybook to use options (styles, assets, ...).",
|
|
10
|
-
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
11
|
-
},
|
|
12
|
-
"debugWebpack": {
|
|
13
|
-
"type": "boolean",
|
|
14
|
-
"description": "Debug the Webpack configuration",
|
|
15
|
-
"default": false
|
|
16
|
-
},
|
|
17
|
-
"tsConfig": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
|
20
|
-
},
|
|
21
|
-
"preserveSymlinks": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"description": "Do not use the real path when resolving modules. If true, symlinks are resolved to their real path, if false, symlinks are resolved to their symlinked path.",
|
|
24
|
-
"default": false
|
|
25
|
-
},
|
|
26
|
-
"port": {
|
|
27
|
-
"type": "number",
|
|
28
|
-
"description": "Port to listen on.",
|
|
29
|
-
"default": 9009
|
|
30
|
-
},
|
|
31
|
-
"host": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "Host to listen on.",
|
|
34
|
-
"default": "localhost"
|
|
35
|
-
},
|
|
36
|
-
"configDir": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "Directory where to load Storybook configurations from.",
|
|
39
|
-
"default": ".storybook"
|
|
40
|
-
},
|
|
41
|
-
"https": {
|
|
42
|
-
"type": "boolean",
|
|
43
|
-
"description": "Serve Storybook over HTTPS. Note: You must provide your own certificate information.",
|
|
44
|
-
"default": false
|
|
45
|
-
},
|
|
46
|
-
"sslCa": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"description": "Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)."
|
|
49
|
-
},
|
|
50
|
-
"sslCert": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "Provide an SSL certificate. (Required with --https)."
|
|
53
|
-
},
|
|
54
|
-
"sslKey": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"description": "SSL key to use for serving HTTPS."
|
|
57
|
-
},
|
|
58
|
-
"smokeTest": {
|
|
59
|
-
"type": "boolean",
|
|
60
|
-
"description": "Exit after successful start.",
|
|
61
|
-
"default": false
|
|
62
|
-
},
|
|
63
|
-
"ci": {
|
|
64
|
-
"type": "boolean",
|
|
65
|
-
"description": "CI mode (skip interactive prompts, don't open browser).",
|
|
66
|
-
"default": false
|
|
67
|
-
},
|
|
68
|
-
"open": {
|
|
69
|
-
"type": "boolean",
|
|
70
|
-
"description": "Whether to open Storybook automatically in the browser.",
|
|
71
|
-
"default": true
|
|
72
|
-
},
|
|
73
|
-
"quiet": {
|
|
74
|
-
"type": "boolean",
|
|
75
|
-
"description": "Suppress verbose build output.",
|
|
76
|
-
"default": false
|
|
77
|
-
},
|
|
78
|
-
"enableProdMode": {
|
|
79
|
-
"type": "boolean",
|
|
80
|
-
"description": "Disable Angular's development mode, which turns off assertions and other checks within the framework.",
|
|
81
|
-
"default": false
|
|
82
|
-
},
|
|
83
|
-
"docs": {
|
|
84
|
-
"type": "boolean",
|
|
85
|
-
"description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/writing-docs/build-documentation#preview-storybooks-documentation.",
|
|
86
|
-
"default": false
|
|
87
|
-
},
|
|
88
|
-
"compodoc": {
|
|
89
|
-
"type": "boolean",
|
|
90
|
-
"description": "Execute compodoc before.",
|
|
91
|
-
"default": true
|
|
92
|
-
},
|
|
93
|
-
"compodocArgs": {
|
|
94
|
-
"type": "array",
|
|
95
|
-
"description": "Compodoc options : https://compodoc.app/guides/options.html. Options `-p` with tsconfig path and `-d` with workspace root is always given.",
|
|
96
|
-
"default": ["-e", "json"],
|
|
97
|
-
"items": {
|
|
98
|
-
"type": "string"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"styles": {
|
|
102
|
-
"type": "array",
|
|
103
|
-
"description": "Global styles to be included in the build.",
|
|
104
|
-
"items": {
|
|
105
|
-
"$ref": "#/definitions/styleElement"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"stylePreprocessorOptions": {
|
|
109
|
-
"description": "Options to pass to style preprocessors.",
|
|
110
|
-
"type": "object",
|
|
111
|
-
"properties": {
|
|
112
|
-
"includePaths": {
|
|
113
|
-
"description": "Paths to include. Paths will be resolved to workspace root.",
|
|
114
|
-
"type": "array",
|
|
115
|
-
"items": {
|
|
116
|
-
"type": "string"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"additionalProperties": false
|
|
121
|
-
},
|
|
122
|
-
"assets": {
|
|
123
|
-
"type": "array",
|
|
124
|
-
"description": "List of static application assets.",
|
|
125
|
-
"default": [],
|
|
126
|
-
"items": {
|
|
127
|
-
"$ref": "#/definitions/assetPattern"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"initialPath": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"description": "URL path to be appended when visiting Storybook for the first time"
|
|
133
|
-
},
|
|
134
|
-
"webpackStatsJson": {
|
|
135
|
-
"type": ["boolean", "string"],
|
|
136
|
-
"description": "Write Webpack Stats JSON to disk",
|
|
137
|
-
"default": false
|
|
138
|
-
},
|
|
139
|
-
"statsJson": {
|
|
140
|
-
"type": ["boolean", "string"],
|
|
141
|
-
"description": "Write stats JSON to disk",
|
|
142
|
-
"default": false
|
|
143
|
-
},
|
|
144
|
-
"previewUrl": {
|
|
145
|
-
"type": "string",
|
|
146
|
-
"description": "Disables the default storybook preview and lets you use your own"
|
|
147
|
-
},
|
|
148
|
-
"loglevel": {
|
|
149
|
-
"type": "string",
|
|
150
|
-
"description": "Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent].",
|
|
151
|
-
"pattern": "(silly|verbose|info|warn|silent)"
|
|
152
|
-
},
|
|
153
|
-
"sourceMap": {
|
|
154
|
-
"type": ["boolean", "object"],
|
|
155
|
-
"description": "Configure sourcemaps. See: https://angular.io/guide/workspace-config#source-map-configuration",
|
|
156
|
-
"default": false
|
|
157
|
-
},
|
|
158
|
-
"experimentalZoneless": {
|
|
159
|
-
"type": "boolean",
|
|
160
|
-
"description": "Experimental: Use zoneless change detection.",
|
|
161
|
-
"default": false
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
"additionalProperties": false,
|
|
165
|
-
"definitions": {
|
|
166
|
-
"assetPattern": {
|
|
167
|
-
"oneOf": [
|
|
168
|
-
{
|
|
169
|
-
"type": "object",
|
|
170
|
-
"properties": {
|
|
171
|
-
"followSymlinks": {
|
|
172
|
-
"type": "boolean",
|
|
173
|
-
"default": false,
|
|
174
|
-
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
|
175
|
-
},
|
|
176
|
-
"glob": {
|
|
177
|
-
"type": "string",
|
|
178
|
-
"description": "The pattern to match."
|
|
179
|
-
},
|
|
180
|
-
"input": {
|
|
181
|
-
"type": "string",
|
|
182
|
-
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
183
|
-
},
|
|
184
|
-
"ignore": {
|
|
185
|
-
"description": "An array of globs to ignore.",
|
|
186
|
-
"type": "array",
|
|
187
|
-
"items": {
|
|
188
|
-
"type": "string"
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
"output": {
|
|
192
|
-
"type": "string",
|
|
193
|
-
"description": "Absolute path within the output."
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"additionalProperties": false,
|
|
197
|
-
"required": ["glob", "input", "output"]
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"type": "string"
|
|
201
|
-
}
|
|
202
|
-
]
|
|
203
|
-
},
|
|
204
|
-
"styleElement": {
|
|
205
|
-
"oneOf": [
|
|
206
|
-
{
|
|
207
|
-
"type": "object",
|
|
208
|
-
"properties": {
|
|
209
|
-
"input": {
|
|
210
|
-
"type": "string",
|
|
211
|
-
"description": "The file to include."
|
|
212
|
-
},
|
|
213
|
-
"bundleName": {
|
|
214
|
-
"type": "string",
|
|
215
|
-
"pattern": "^[\\w\\-.]*$",
|
|
216
|
-
"description": "The bundle name for this extra entry point."
|
|
217
|
-
},
|
|
218
|
-
"inject": {
|
|
219
|
-
"type": "boolean",
|
|
220
|
-
"description": "If the bundle will be referenced in the HTML file.",
|
|
221
|
-
"default": true
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
"additionalProperties": false,
|
|
225
|
-
"required": ["input"]
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"type": "string",
|
|
229
|
-
"description": "The file to include."
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.errorSummary = exports.printErrorDetails = void 0;
|
|
4
|
-
const node_logger_1 = require("storybook/internal/node-logger");
|
|
5
|
-
const ts_dedent_1 = require("ts-dedent");
|
|
6
|
-
const printErrorDetails = (error) => {
|
|
7
|
-
// Duplicate code for Standalone error handling
|
|
8
|
-
// Source: https://github.com/storybookjs/storybook/blob/39c7ba09ad84fbd466f9c25d5b92791a5450b9f6/lib/core-server/src/build-dev.ts#L136
|
|
9
|
-
node_logger_1.instance.heading = '';
|
|
10
|
-
if (error instanceof Error) {
|
|
11
|
-
if (error.error) {
|
|
12
|
-
node_logger_1.logger.error(error.error);
|
|
13
|
-
}
|
|
14
|
-
else if (error.stats && error.stats.compilation.errors) {
|
|
15
|
-
error.stats.compilation.errors.forEach((e) => node_logger_1.logger.plain(e));
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
node_logger_1.logger.error(error);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else if (error.compilation?.errors) {
|
|
22
|
-
error.compilation.errors.forEach((e) => node_logger_1.logger.plain(e));
|
|
23
|
-
}
|
|
24
|
-
node_logger_1.logger.line();
|
|
25
|
-
};
|
|
26
|
-
exports.printErrorDetails = printErrorDetails;
|
|
27
|
-
const errorSummary = (error) => {
|
|
28
|
-
return error.close
|
|
29
|
-
? (0, ts_dedent_1.dedent) `
|
|
30
|
-
FATAL broken build!, will close the process,
|
|
31
|
-
Fix the error below and restart storybook.
|
|
32
|
-
`
|
|
33
|
-
: (0, ts_dedent_1.dedent) `
|
|
34
|
-
Broken build, fix the error above.
|
|
35
|
-
You may need to refresh the browser.
|
|
36
|
-
`;
|
|
37
|
-
};
|
|
38
|
-
exports.errorSummary = errorSummary;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { logger, instance as npmLog } from 'storybook/internal/node-logger';
|
|
2
|
-
import { dedent } from 'ts-dedent';
|
|
3
|
-
export const printErrorDetails = (error) => {
|
|
4
|
-
// Duplicate code for Standalone error handling
|
|
5
|
-
// Source: https://github.com/storybookjs/storybook/blob/39c7ba09ad84fbd466f9c25d5b92791a5450b9f6/lib/core-server/src/build-dev.ts#L136
|
|
6
|
-
npmLog.heading = '';
|
|
7
|
-
if (error instanceof Error) {
|
|
8
|
-
if (error.error) {
|
|
9
|
-
logger.error(error.error);
|
|
10
|
-
}
|
|
11
|
-
else if (error.stats && error.stats.compilation.errors) {
|
|
12
|
-
error.stats.compilation.errors.forEach((e) => logger.plain(e));
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
logger.error(error);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
else if (error.compilation?.errors) {
|
|
19
|
-
error.compilation.errors.forEach((e) => logger.plain(e));
|
|
20
|
-
}
|
|
21
|
-
logger.line();
|
|
22
|
-
};
|
|
23
|
-
export const errorSummary = (error) => {
|
|
24
|
-
return error.close
|
|
25
|
-
? dedent `
|
|
26
|
-
FATAL broken build!, will close the process,
|
|
27
|
-
Fix the error below and restart storybook.
|
|
28
|
-
`
|
|
29
|
-
: dedent `
|
|
30
|
-
Broken build, fix the error above.
|
|
31
|
-
You may need to refresh the browser.
|
|
32
|
-
`;
|
|
33
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runCompodoc = void 0;
|
|
4
|
-
const node_path_1 = require("node:path");
|
|
5
|
-
const common_1 = require("storybook/internal/common");
|
|
6
|
-
const rxjs_1 = require("rxjs");
|
|
7
|
-
const hasTsConfigArg = (args) => args.indexOf('-p') !== -1;
|
|
8
|
-
const hasOutputArg = (args) => args.indexOf('-d') !== -1 || args.indexOf('--output') !== -1;
|
|
9
|
-
// relative is necessary to workaround a compodoc issue with
|
|
10
|
-
// absolute paths on windows machines
|
|
11
|
-
const toRelativePath = (pathToTsConfig) => {
|
|
12
|
-
return (0, node_path_1.isAbsolute)(pathToTsConfig) ? (0, node_path_1.relative)('.', pathToTsConfig) : pathToTsConfig;
|
|
13
|
-
};
|
|
14
|
-
const runCompodoc = ({ compodocArgs, tsconfig }, context) => {
|
|
15
|
-
return new rxjs_1.Observable((observer) => {
|
|
16
|
-
const tsConfigPath = toRelativePath(tsconfig);
|
|
17
|
-
const finalCompodocArgs = [
|
|
18
|
-
...(hasTsConfigArg(compodocArgs) ? [] : ['-p', tsConfigPath]),
|
|
19
|
-
...(hasOutputArg(compodocArgs) ? [] : ['-d', `${context.workspaceRoot || '.'}`]),
|
|
20
|
-
...compodocArgs,
|
|
21
|
-
];
|
|
22
|
-
const packageManager = common_1.JsPackageManagerFactory.getPackageManager();
|
|
23
|
-
try {
|
|
24
|
-
const stdout = packageManager.runPackageCommandSync('compodoc', finalCompodocArgs, context.workspaceRoot, 'inherit');
|
|
25
|
-
context.logger.info(stdout);
|
|
26
|
-
observer.next();
|
|
27
|
-
observer.complete();
|
|
28
|
-
}
|
|
29
|
-
catch (e) {
|
|
30
|
-
context.logger.error(e);
|
|
31
|
-
observer.error();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
exports.runCompodoc = runCompodoc;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { isAbsolute, relative } from 'node:path';
|
|
2
|
-
import { JsPackageManagerFactory } from 'storybook/internal/common';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
const hasTsConfigArg = (args) => args.indexOf('-p') !== -1;
|
|
5
|
-
const hasOutputArg = (args) => args.indexOf('-d') !== -1 || args.indexOf('--output') !== -1;
|
|
6
|
-
// relative is necessary to workaround a compodoc issue with
|
|
7
|
-
// absolute paths on windows machines
|
|
8
|
-
const toRelativePath = (pathToTsConfig) => {
|
|
9
|
-
return isAbsolute(pathToTsConfig) ? relative('.', pathToTsConfig) : pathToTsConfig;
|
|
10
|
-
};
|
|
11
|
-
export const runCompodoc = ({ compodocArgs, tsconfig }, context) => {
|
|
12
|
-
return new Observable((observer) => {
|
|
13
|
-
const tsConfigPath = toRelativePath(tsconfig);
|
|
14
|
-
const finalCompodocArgs = [
|
|
15
|
-
...(hasTsConfigArg(compodocArgs) ? [] : ['-p', tsConfigPath]),
|
|
16
|
-
...(hasOutputArg(compodocArgs) ? [] : ['-d', `${context.workspaceRoot || '.'}`]),
|
|
17
|
-
...compodocArgs,
|
|
18
|
-
];
|
|
19
|
-
const packageManager = JsPackageManagerFactory.getPackageManager();
|
|
20
|
-
try {
|
|
21
|
-
const stdout = packageManager.runPackageCommandSync('compodoc', finalCompodocArgs, context.workspaceRoot, 'inherit');
|
|
22
|
-
context.logger.info(stdout);
|
|
23
|
-
observer.next();
|
|
24
|
-
observer.complete();
|
|
25
|
-
}
|
|
26
|
-
catch (e) {
|
|
27
|
-
context.logger.error(e);
|
|
28
|
-
observer.error();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const operators_1 = require("rxjs/operators");
|
|
4
|
-
const vitest_1 = require("vitest");
|
|
5
|
-
const run_compodoc_1 = require("./run-compodoc");
|
|
6
|
-
const mockRunScript = vitest_1.vi.fn();
|
|
7
|
-
vitest_1.vi.mock('storybook/internal/common', () => ({
|
|
8
|
-
JsPackageManagerFactory: {
|
|
9
|
-
getPackageManager: () => ({
|
|
10
|
-
runPackageCommandSync: mockRunScript,
|
|
11
|
-
}),
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
const builderContextLoggerMock = {
|
|
15
|
-
createChild: vitest_1.vi.fn(),
|
|
16
|
-
log: vitest_1.vi.fn(),
|
|
17
|
-
debug: vitest_1.vi.fn(),
|
|
18
|
-
info: vitest_1.vi.fn(),
|
|
19
|
-
warn: vitest_1.vi.fn(),
|
|
20
|
-
error: vitest_1.vi.fn(),
|
|
21
|
-
fatal: vitest_1.vi.fn(),
|
|
22
|
-
};
|
|
23
|
-
(0, vitest_1.describe)('runCompodoc', () => {
|
|
24
|
-
(0, vitest_1.afterEach)(() => {
|
|
25
|
-
mockRunScript.mockClear();
|
|
26
|
-
});
|
|
27
|
-
const builderContextMock = {
|
|
28
|
-
workspaceRoot: 'path/to/project',
|
|
29
|
-
logger: builderContextLoggerMock,
|
|
30
|
-
};
|
|
31
|
-
(0, vitest_1.it)('should run compodoc with tsconfig from context', async () => {
|
|
32
|
-
(0, run_compodoc_1.runCompodoc)({
|
|
33
|
-
compodocArgs: [],
|
|
34
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
35
|
-
}, builderContextMock)
|
|
36
|
-
.pipe((0, operators_1.take)(1))
|
|
37
|
-
.subscribe();
|
|
38
|
-
(0, vitest_1.expect)(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], 'path/to/project', 'inherit');
|
|
39
|
-
});
|
|
40
|
-
(0, vitest_1.it)('should run compodoc with tsconfig from compodocArgs', async () => {
|
|
41
|
-
(0, run_compodoc_1.runCompodoc)({
|
|
42
|
-
compodocArgs: ['-p', 'path/to/tsconfig.stories.json'],
|
|
43
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
44
|
-
}, builderContextMock)
|
|
45
|
-
.pipe((0, operators_1.take)(1))
|
|
46
|
-
.subscribe();
|
|
47
|
-
(0, vitest_1.expect)(mockRunScript).toHaveBeenCalledWith('compodoc', ['-d', 'path/to/project', '-p', 'path/to/tsconfig.stories.json'], 'path/to/project', 'inherit');
|
|
48
|
-
});
|
|
49
|
-
(0, vitest_1.it)('should run compodoc with default output folder.', async () => {
|
|
50
|
-
(0, run_compodoc_1.runCompodoc)({
|
|
51
|
-
compodocArgs: [],
|
|
52
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
53
|
-
}, builderContextMock)
|
|
54
|
-
.pipe((0, operators_1.take)(1))
|
|
55
|
-
.subscribe();
|
|
56
|
-
(0, vitest_1.expect)(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], 'path/to/project', 'inherit');
|
|
57
|
-
});
|
|
58
|
-
(0, vitest_1.it)('should run with custom output folder specified with --output compodocArgs', async () => {
|
|
59
|
-
(0, run_compodoc_1.runCompodoc)({
|
|
60
|
-
compodocArgs: ['--output', 'path/to/customFolder'],
|
|
61
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
62
|
-
}, builderContextMock)
|
|
63
|
-
.pipe((0, operators_1.take)(1))
|
|
64
|
-
.subscribe();
|
|
65
|
-
(0, vitest_1.expect)(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '--output', 'path/to/customFolder'], 'path/to/project', 'inherit');
|
|
66
|
-
});
|
|
67
|
-
(0, vitest_1.it)('should run with custom output folder specified with -d compodocArgs', async () => {
|
|
68
|
-
(0, run_compodoc_1.runCompodoc)({
|
|
69
|
-
compodocArgs: ['-d', 'path/to/customFolder'],
|
|
70
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
71
|
-
}, builderContextMock)
|
|
72
|
-
.pipe((0, operators_1.take)(1))
|
|
73
|
-
.subscribe();
|
|
74
|
-
(0, vitest_1.expect)(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '-d', 'path/to/customFolder'], 'path/to/project', 'inherit');
|
|
75
|
-
});
|
|
76
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { take } from 'rxjs/operators';
|
|
2
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
3
|
-
import { runCompodoc } from './run-compodoc';
|
|
4
|
-
const mockRunScript = vi.fn();
|
|
5
|
-
vi.mock('storybook/internal/common', () => ({
|
|
6
|
-
JsPackageManagerFactory: {
|
|
7
|
-
getPackageManager: () => ({
|
|
8
|
-
runPackageCommandSync: mockRunScript,
|
|
9
|
-
}),
|
|
10
|
-
},
|
|
11
|
-
}));
|
|
12
|
-
const builderContextLoggerMock = {
|
|
13
|
-
createChild: vi.fn(),
|
|
14
|
-
log: vi.fn(),
|
|
15
|
-
debug: vi.fn(),
|
|
16
|
-
info: vi.fn(),
|
|
17
|
-
warn: vi.fn(),
|
|
18
|
-
error: vi.fn(),
|
|
19
|
-
fatal: vi.fn(),
|
|
20
|
-
};
|
|
21
|
-
describe('runCompodoc', () => {
|
|
22
|
-
afterEach(() => {
|
|
23
|
-
mockRunScript.mockClear();
|
|
24
|
-
});
|
|
25
|
-
const builderContextMock = {
|
|
26
|
-
workspaceRoot: 'path/to/project',
|
|
27
|
-
logger: builderContextLoggerMock,
|
|
28
|
-
};
|
|
29
|
-
it('should run compodoc with tsconfig from context', async () => {
|
|
30
|
-
runCompodoc({
|
|
31
|
-
compodocArgs: [],
|
|
32
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
33
|
-
}, builderContextMock)
|
|
34
|
-
.pipe(take(1))
|
|
35
|
-
.subscribe();
|
|
36
|
-
expect(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], 'path/to/project', 'inherit');
|
|
37
|
-
});
|
|
38
|
-
it('should run compodoc with tsconfig from compodocArgs', async () => {
|
|
39
|
-
runCompodoc({
|
|
40
|
-
compodocArgs: ['-p', 'path/to/tsconfig.stories.json'],
|
|
41
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
42
|
-
}, builderContextMock)
|
|
43
|
-
.pipe(take(1))
|
|
44
|
-
.subscribe();
|
|
45
|
-
expect(mockRunScript).toHaveBeenCalledWith('compodoc', ['-d', 'path/to/project', '-p', 'path/to/tsconfig.stories.json'], 'path/to/project', 'inherit');
|
|
46
|
-
});
|
|
47
|
-
it('should run compodoc with default output folder.', async () => {
|
|
48
|
-
runCompodoc({
|
|
49
|
-
compodocArgs: [],
|
|
50
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
51
|
-
}, builderContextMock)
|
|
52
|
-
.pipe(take(1))
|
|
53
|
-
.subscribe();
|
|
54
|
-
expect(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], 'path/to/project', 'inherit');
|
|
55
|
-
});
|
|
56
|
-
it('should run with custom output folder specified with --output compodocArgs', async () => {
|
|
57
|
-
runCompodoc({
|
|
58
|
-
compodocArgs: ['--output', 'path/to/customFolder'],
|
|
59
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
60
|
-
}, builderContextMock)
|
|
61
|
-
.pipe(take(1))
|
|
62
|
-
.subscribe();
|
|
63
|
-
expect(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '--output', 'path/to/customFolder'], 'path/to/project', 'inherit');
|
|
64
|
-
});
|
|
65
|
-
it('should run with custom output folder specified with -d compodocArgs', async () => {
|
|
66
|
-
runCompodoc({
|
|
67
|
-
compodocArgs: ['-d', 'path/to/customFolder'],
|
|
68
|
-
tsconfig: 'path/to/tsconfig.json',
|
|
69
|
-
}, builderContextMock)
|
|
70
|
-
.pipe(take(1))
|
|
71
|
-
.subscribe();
|
|
72
|
-
expect(mockRunScript).toHaveBeenCalledWith('compodoc', ['-p', 'path/to/tsconfig.json', '-d', 'path/to/customFolder'], 'path/to/project', 'inherit');
|
|
73
|
-
});
|
|
74
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BuilderOptions, CLIOptions, LoadOptions } from 'storybook/internal/types';
|
|
2
|
-
import { BuilderContext } from '@angular-devkit/architect';
|
|
3
|
-
import { AssetPattern, SourceMapUnion, StyleElement, StylePreprocessorOptions } from '@angular-devkit/build-angular/src/builders/browser/schema';
|
|
4
|
-
export type StandaloneOptions = CLIOptions & LoadOptions & BuilderOptions & {
|
|
5
|
-
mode?: 'static' | 'dev';
|
|
6
|
-
enableProdMode: boolean;
|
|
7
|
-
angularBrowserTarget?: string | null;
|
|
8
|
-
angularBuilderOptions?: Record<string, any> & {
|
|
9
|
-
styles?: StyleElement[];
|
|
10
|
-
stylePreprocessorOptions?: StylePreprocessorOptions;
|
|
11
|
-
assets?: AssetPattern[];
|
|
12
|
-
sourceMap?: SourceMapUnion;
|
|
13
|
-
preserveSymlinks?: boolean;
|
|
14
|
-
experimentalZoneless?: boolean;
|
|
15
|
-
};
|
|
16
|
-
angularBuilderContext?: BuilderContext | null;
|
|
17
|
-
tsConfig?: string;
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { ICollection, StoryFnAngularReturnType } from '../types';
|
|
3
|
-
type StoryRenderInfo = {
|
|
4
|
-
storyFnAngular: StoryFnAngularReturnType;
|
|
5
|
-
moduleMetadataSnapshot: string;
|
|
6
|
-
};
|
|
7
|
-
declare global {
|
|
8
|
-
const STORYBOOK_ANGULAR_OPTIONS: {
|
|
9
|
-
experimentalZoneless: boolean;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Attribute name for the story UID that may be written to the targetDOMNode.
|
|
14
|
-
*
|
|
15
|
-
* If a target DOM node has a story UID attribute, it will be used as part of the selector for the
|
|
16
|
-
* Angular component.
|
|
17
|
-
*/
|
|
18
|
-
export declare const STORY_UID_ATTRIBUTE = "data-sb-story-uid";
|
|
19
|
-
export declare abstract class AbstractRenderer {
|
|
20
|
-
/** Wait and destroy the platform */
|
|
21
|
-
static resetApplications(domNode?: HTMLElement): void;
|
|
22
|
-
protected previousStoryRenderInfo: Map<HTMLElement, StoryRenderInfo>;
|
|
23
|
-
protected storyProps$: Subject<ICollection | undefined>;
|
|
24
|
-
protected abstract beforeFullRender(domNode?: HTMLElement): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Bootstrap main angular module with main component or send only new `props` with storyProps$
|
|
27
|
-
*
|
|
28
|
-
* @param storyFnAngular {StoryFnAngularReturnType}
|
|
29
|
-
* @param forced {boolean} If :
|
|
30
|
-
*
|
|
31
|
-
* - True render will only use the StoryFn `props' in storyProps observable that will update sotry's
|
|
32
|
-
* component/template properties. Improves performance without reloading the whole
|
|
33
|
-
* module&component if props changes
|
|
34
|
-
* - False fully recharges or initializes angular module & component
|
|
35
|
-
*
|
|
36
|
-
* @param component {Component}
|
|
37
|
-
*/
|
|
38
|
-
render({ storyFnAngular, forced, component, targetDOMNode, }: {
|
|
39
|
-
storyFnAngular: StoryFnAngularReturnType;
|
|
40
|
-
forced: boolean;
|
|
41
|
-
component?: any;
|
|
42
|
-
targetDOMNode: HTMLElement;
|
|
43
|
-
}): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Only ASCII alphanumerics can be used as HTML tag name. https://html.spec.whatwg.org/#elements-2
|
|
46
|
-
*
|
|
47
|
-
* Therefore, stories break when non-ASCII alphanumerics are included in target selector.
|
|
48
|
-
* https://github.com/storybookjs/storybook/issues/15147
|
|
49
|
-
*
|
|
50
|
-
* This method returns storyId when it doesn't contain any non-ASCII alphanumerics. Otherwise, it
|
|
51
|
-
* generates a valid HTML tag name from storyId by removing non-ASCII alphanumerics from storyId,
|
|
52
|
-
* prefixing "sb-", and suffixing "-component"
|
|
53
|
-
*
|
|
54
|
-
* @memberof AbstractRenderer
|
|
55
|
-
* @protected
|
|
56
|
-
*/
|
|
57
|
-
protected generateTargetSelectorFromStoryId(id: string): string;
|
|
58
|
-
/**
|
|
59
|
-
* Angular is unable to handle components that have selectors with accented attributes.
|
|
60
|
-
*
|
|
61
|
-
* Therefore, stories break when meta's title contains accents.
|
|
62
|
-
* https://github.com/storybookjs/storybook/issues/29132
|
|
63
|
-
*
|
|
64
|
-
* This method filters accents from a given raw id. For example, this method converts
|
|
65
|
-
* 'Example/Button with an "é" accent' into 'Example/Button with an "e" accent'.
|
|
66
|
-
*
|
|
67
|
-
* @memberof AbstractRenderer
|
|
68
|
-
* @protected
|
|
69
|
-
*/
|
|
70
|
-
protected generateStoryUIdFromRawStoryUid(rawStoryUid: string | null): string | null;
|
|
71
|
-
/** Adds DOM element that angular will use as bootstrap component. */
|
|
72
|
-
protected initAngularRootElement(targetDOMNode: HTMLElement, targetSelector: string): void;
|
|
73
|
-
private fullRendererRequired;
|
|
74
|
-
}
|
|
75
|
-
export {};
|