@storybook/angular 8.0.0-beta.4 → 8.0.0-beta.6
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/builders/build-storybook/index.d.ts +2 -2
- package/dist/builders/build-storybook/index.js +4 -2
- package/dist/builders/build-storybook/index.spec.js +6 -6
- package/dist/builders/start-storybook/index.d.ts +2 -2
- package/dist/builders/start-storybook/index.js +5 -3
- package/dist/server/framework-preset-angular-ivy.js +2 -2
- package/package.json +12 -12
|
@@ -15,7 +15,7 @@ export type StorybookBuilderOptions = JsonObject & {
|
|
|
15
15
|
stylePreprocessorOptions?: StylePreprocessorOptions;
|
|
16
16
|
assets?: AssetPattern[];
|
|
17
17
|
sourceMap?: SourceMapUnion;
|
|
18
|
-
} & Pick<CLIOptions, 'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'test' | 'webpackStatsJson' | 'disableTelemetry' | 'debugWebpack' | 'previewUrl'>;
|
|
18
|
+
} & Pick<CLIOptions, 'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'test' | 'webpackStatsJson' | 'statsJson' | 'disableTelemetry' | 'debugWebpack' | 'previewUrl'>;
|
|
19
19
|
export type StorybookBuilderOutput = JsonObject & BuilderOutput & {
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
};
|
|
@@ -31,5 +31,5 @@ declare const _default: import("@angular-devkit/architect/src/internal").Builder
|
|
|
31
31
|
stylePreprocessorOptions?: StylePreprocessorOptions | undefined;
|
|
32
32
|
assets?: AssetPattern[] | undefined;
|
|
33
33
|
sourceMap?: SourceMapUnion | undefined;
|
|
34
|
-
} & Pick<CLIOptions, "
|
|
34
|
+
} & Pick<CLIOptions, "statsJson" | "outputDir" | "configDir" | "loglevel" | "quiet" | "test" | "webpackStatsJson" | "disableTelemetry" | "debugWebpack" | "previewUrl">>;
|
|
35
35
|
export default _default;
|
|
@@ -13,8 +13,9 @@ const error_handler_1 = require("../utils/error-handler");
|
|
|
13
13
|
(0, telemetry_1.addToGlobalContext)('cliVersion', core_common_1.versions.storybook);
|
|
14
14
|
const commandBuilder = (options, context) => {
|
|
15
15
|
const builder = (0, rxjs_1.from)(setup(options, context)).pipe((0, operators_1.switchMap)(({ tsConfig }) => {
|
|
16
|
+
const docTSConfig = (0, find_up_1.sync)('tsconfig.doc.json', { cwd: options.configDir });
|
|
16
17
|
const runCompodoc$ = options.compodoc
|
|
17
|
-
? (0, run_compodoc_1.runCompodoc)({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe((0, operators_1.mapTo)({ tsConfig }))
|
|
18
|
+
? (0, run_compodoc_1.runCompodoc)({ compodocArgs: options.compodocArgs, tsconfig: docTSConfig ?? tsConfig }, context).pipe((0, operators_1.mapTo)({ tsConfig }))
|
|
18
19
|
: (0, rxjs_1.of)({});
|
|
19
20
|
return runCompodoc$.pipe((0, operators_1.mapTo)({ tsConfig }));
|
|
20
21
|
}), (0, operators_1.map)(({ tsConfig }) => {
|
|
@@ -23,7 +24,7 @@ const commandBuilder = (options, context) => {
|
|
|
23
24
|
outputDir: 'SBCONFIG_OUTPUT_DIR',
|
|
24
25
|
configDir: 'SBCONFIG_CONFIG_DIR',
|
|
25
26
|
});
|
|
26
|
-
const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, test, outputDir, quiet, enableProdMode = true, webpackStatsJson, debugWebpack, disableTelemetry, assets, previewUrl, sourceMap = false, } = options;
|
|
27
|
+
const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, test, outputDir, quiet, enableProdMode = true, webpackStatsJson, statsJson, debugWebpack, disableTelemetry, assets, previewUrl, sourceMap = false, } = options;
|
|
27
28
|
const standaloneOptions = {
|
|
28
29
|
packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
|
|
29
30
|
configDir,
|
|
@@ -44,6 +45,7 @@ const commandBuilder = (options, context) => {
|
|
|
44
45
|
},
|
|
45
46
|
tsConfig,
|
|
46
47
|
webpackStatsJson,
|
|
48
|
+
statsJson,
|
|
47
49
|
debugWebpack,
|
|
48
50
|
previewUrl,
|
|
49
51
|
};
|
|
@@ -105,7 +105,7 @@ vitest_1.describe.skip('Build Storybook Builder', () => {
|
|
|
105
105
|
packageJson: vitest_1.expect.any(Object),
|
|
106
106
|
mode: 'static',
|
|
107
107
|
tsConfig: './storybook/tsconfig.ts',
|
|
108
|
-
|
|
108
|
+
statsJson: false,
|
|
109
109
|
}));
|
|
110
110
|
});
|
|
111
111
|
(0, vitest_1.it)('should start storybook with tsConfig', async () => {
|
|
@@ -128,14 +128,14 @@ vitest_1.describe.skip('Build Storybook Builder', () => {
|
|
|
128
128
|
packageJson: vitest_1.expect.any(Object),
|
|
129
129
|
mode: 'static',
|
|
130
130
|
tsConfig: 'path/to/tsConfig.json',
|
|
131
|
-
|
|
131
|
+
statsJson: false,
|
|
132
132
|
}));
|
|
133
133
|
});
|
|
134
134
|
(0, vitest_1.it)('should build storybook with webpack stats.json', async () => {
|
|
135
135
|
const run = await architect.scheduleBuilder('@storybook/angular:build-storybook', {
|
|
136
136
|
tsConfig: 'path/to/tsConfig.json',
|
|
137
137
|
compodoc: false,
|
|
138
|
-
|
|
138
|
+
statsJson: true,
|
|
139
139
|
});
|
|
140
140
|
const output = await run.result;
|
|
141
141
|
await run.stop();
|
|
@@ -151,7 +151,7 @@ vitest_1.describe.skip('Build Storybook Builder', () => {
|
|
|
151
151
|
packageJson: vitest_1.expect.any(Object),
|
|
152
152
|
mode: 'static',
|
|
153
153
|
tsConfig: 'path/to/tsConfig.json',
|
|
154
|
-
|
|
154
|
+
statsJson: true,
|
|
155
155
|
}));
|
|
156
156
|
});
|
|
157
157
|
(0, vitest_1.it)('should throw error', async () => {
|
|
@@ -186,7 +186,7 @@ vitest_1.describe.skip('Build Storybook Builder', () => {
|
|
|
186
186
|
packageJson: vitest_1.expect.any(Object),
|
|
187
187
|
mode: 'static',
|
|
188
188
|
tsConfig: './storybook/tsconfig.ts',
|
|
189
|
-
|
|
189
|
+
statsJson: false,
|
|
190
190
|
}));
|
|
191
191
|
});
|
|
192
192
|
(0, vitest_1.it)('should start storybook with styles options', async () => {
|
|
@@ -210,7 +210,7 @@ vitest_1.describe.skip('Build Storybook Builder', () => {
|
|
|
210
210
|
packageJson: vitest_1.expect.any(Object),
|
|
211
211
|
mode: 'static',
|
|
212
212
|
tsConfig: 'path/to/tsConfig.json',
|
|
213
|
-
|
|
213
|
+
statsJson: false,
|
|
214
214
|
}));
|
|
215
215
|
});
|
|
216
216
|
});
|
|
@@ -13,7 +13,7 @@ export type StorybookBuilderOptions = JsonObject & {
|
|
|
13
13
|
stylePreprocessorOptions?: StylePreprocessorOptions;
|
|
14
14
|
assets?: AssetPattern[];
|
|
15
15
|
sourceMap?: SourceMapUnion;
|
|
16
|
-
} & Pick<CLIOptions, 'port' | 'host' | 'configDir' | 'https' | 'sslCa' | 'sslCert' | 'sslKey' | 'smokeTest' | 'ci' | 'quiet' | 'disableTelemetry' | 'initialPath' | 'open' | 'docs' | 'debugWebpack' | 'webpackStatsJson' | 'loglevel' | 'previewUrl'>;
|
|
16
|
+
} & Pick<CLIOptions, 'port' | 'host' | 'configDir' | 'https' | 'sslCa' | 'sslCert' | 'sslKey' | 'smokeTest' | 'ci' | 'quiet' | 'disableTelemetry' | 'initialPath' | 'open' | 'docs' | 'debugWebpack' | 'webpackStatsJson' | 'statsJson' | 'loglevel' | 'previewUrl'>;
|
|
17
17
|
export type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
|
|
18
18
|
declare const _default: import("@angular-devkit/architect/src/internal").Builder<JsonObject & {
|
|
19
19
|
browserTarget?: string | null | undefined;
|
|
@@ -25,5 +25,5 @@ declare const _default: import("@angular-devkit/architect/src/internal").Builder
|
|
|
25
25
|
stylePreprocessorOptions?: StylePreprocessorOptions | undefined;
|
|
26
26
|
assets?: AssetPattern[] | undefined;
|
|
27
27
|
sourceMap?: SourceMapUnion | undefined;
|
|
28
|
-
} & Pick<CLIOptions, "docs" | "
|
|
28
|
+
} & Pick<CLIOptions, "docs" | "statsJson" | "configDir" | "loglevel" | "quiet" | "webpackStatsJson" | "disableTelemetry" | "debugWebpack" | "previewUrl" | "port" | "host" | "initialPath" | "https" | "sslCa" | "sslCert" | "sslKey" | "smokeTest" | "open" | "ci">>;
|
|
29
29
|
export default _default;
|
|
@@ -13,10 +13,11 @@ const error_handler_1 = require("../utils/error-handler");
|
|
|
13
13
|
(0, telemetry_1.addToGlobalContext)('cliVersion', core_common_1.versions.storybook);
|
|
14
14
|
const commandBuilder = (options, context) => {
|
|
15
15
|
const builder = (0, rxjs_1.from)(setup(options, context)).pipe((0, operators_1.switchMap)(({ tsConfig }) => {
|
|
16
|
+
const docTSConfig = (0, find_up_1.sync)('tsconfig.doc.json', { cwd: options.configDir });
|
|
16
17
|
const runCompodoc$ = options.compodoc
|
|
17
18
|
? (0, run_compodoc_1.runCompodoc)({
|
|
18
19
|
compodocArgs: [...options.compodocArgs, ...(options.quiet ? ['--silent'] : [])],
|
|
19
|
-
tsconfig: tsConfig,
|
|
20
|
+
tsconfig: docTSConfig ?? tsConfig,
|
|
20
21
|
}, context).pipe((0, operators_1.mapTo)({ tsConfig }))
|
|
21
22
|
: (0, rxjs_1.of)({});
|
|
22
23
|
return runCompodoc$.pipe((0, operators_1.mapTo)({ tsConfig }));
|
|
@@ -29,7 +30,7 @@ const commandBuilder = (options, context) => {
|
|
|
29
30
|
ci: 'CI',
|
|
30
31
|
});
|
|
31
32
|
options.port = parseInt(`${options.port}`, 10);
|
|
32
|
-
const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, enableProdMode = false, smokeTest, sslCa, sslCert, sslKey, disableTelemetry, assets, initialPath, open, debugWebpack, loglevel, webpackStatsJson, previewUrl, sourceMap = false, } = options;
|
|
33
|
+
const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, enableProdMode = false, smokeTest, sslCa, sslCert, sslKey, disableTelemetry, assets, initialPath, open, debugWebpack, loglevel, webpackStatsJson, statsJson, previewUrl, sourceMap = false, } = options;
|
|
33
34
|
const standaloneOptions = {
|
|
34
35
|
packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
|
|
35
36
|
ci,
|
|
@@ -57,8 +58,9 @@ const commandBuilder = (options, context) => {
|
|
|
57
58
|
initialPath,
|
|
58
59
|
open,
|
|
59
60
|
debugWebpack,
|
|
60
|
-
loglevel,
|
|
61
61
|
webpackStatsJson,
|
|
62
|
+
statsJson,
|
|
63
|
+
loglevel,
|
|
62
64
|
previewUrl,
|
|
63
65
|
};
|
|
64
66
|
return standaloneOptions;
|
|
@@ -64,8 +64,8 @@ const runNgcc = async () => {
|
|
|
64
64
|
// should be async: true but does not work due to
|
|
65
65
|
// https://github.com/storybookjs/storybook/pull/11157/files#r615413803
|
|
66
66
|
async: false,
|
|
67
|
-
basePath: path.join(process.cwd(), 'node_modules'),
|
|
68
|
-
createNewEntryPointFormats: true,
|
|
67
|
+
basePath: path.join(process.cwd(), 'node_modules'), // absolute path to node_modules
|
|
68
|
+
createNewEntryPointFormats: true, // --create-ivy-entry-points
|
|
69
69
|
compileAllFormats: false, // --first-only
|
|
70
70
|
});
|
|
71
71
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.6",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/tsc.ts"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@storybook/builder-webpack5": "8.0.0-beta.
|
|
41
|
-
"@storybook/client-logger": "8.0.0-beta.
|
|
42
|
-
"@storybook/core-common": "8.0.0-beta.
|
|
43
|
-
"@storybook/core-events": "8.0.0-beta.
|
|
44
|
-
"@storybook/core-server": "8.0.0-beta.
|
|
45
|
-
"@storybook/core-webpack": "8.0.0-beta.
|
|
46
|
-
"@storybook/docs-tools": "8.0.0-beta.
|
|
40
|
+
"@storybook/builder-webpack5": "8.0.0-beta.6",
|
|
41
|
+
"@storybook/client-logger": "8.0.0-beta.6",
|
|
42
|
+
"@storybook/core-common": "8.0.0-beta.6",
|
|
43
|
+
"@storybook/core-events": "8.0.0-beta.6",
|
|
44
|
+
"@storybook/core-server": "8.0.0-beta.6",
|
|
45
|
+
"@storybook/core-webpack": "8.0.0-beta.6",
|
|
46
|
+
"@storybook/docs-tools": "8.0.0-beta.6",
|
|
47
47
|
"@storybook/global": "^5.0.0",
|
|
48
|
-
"@storybook/node-logger": "8.0.0-beta.
|
|
49
|
-
"@storybook/preview-api": "8.0.0-beta.
|
|
50
|
-
"@storybook/telemetry": "8.0.0-beta.
|
|
51
|
-
"@storybook/types": "8.0.0-beta.
|
|
48
|
+
"@storybook/node-logger": "8.0.0-beta.6",
|
|
49
|
+
"@storybook/preview-api": "8.0.0-beta.6",
|
|
50
|
+
"@storybook/telemetry": "8.0.0-beta.6",
|
|
51
|
+
"@storybook/types": "8.0.0-beta.6",
|
|
52
52
|
"@types/node": "^18.0.0",
|
|
53
53
|
"@types/react": "^18.0.37",
|
|
54
54
|
"@types/react-dom": "^18.0.11",
|