@storybook/angular 7.0.0-alpha.3 → 7.0.0-alpha.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/types/builders/build-storybook/index.js +4 -6
- package/dist/types/builders/start-storybook/index.js +4 -6
- package/dist/types/builders/utils/standalone-options.d.ts +12 -0
- package/dist/types/builders/utils/standalone-options.js +2 -0
- package/package.json +13 -14
- package/standalone.d.ts +0 -21
- package/standalone.js +0 -7
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const architect_1 = require("@angular-devkit/architect");
|
|
7
4
|
const rxjs_1 = require("rxjs");
|
|
8
5
|
const operators_1 = require("rxjs/operators");
|
|
9
6
|
const find_up_1 = require("find-up");
|
|
10
|
-
|
|
11
|
-
const
|
|
7
|
+
const read_pkg_up_1 = require("read-pkg-up");
|
|
8
|
+
const core_server_1 = require("@storybook/core-server");
|
|
12
9
|
const run_compodoc_1 = require("../utils/run-compodoc");
|
|
13
10
|
const build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
|
|
14
11
|
exports.default = (0, architect_1.createBuilder)(commandBuilder);
|
|
@@ -21,6 +18,7 @@ function commandBuilder(options, context) {
|
|
|
21
18
|
}), (0, operators_1.map)(({ tsConfig }) => {
|
|
22
19
|
const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, outputDir, quiet, webpackStatsJson, } = options;
|
|
23
20
|
const standaloneOptions = {
|
|
21
|
+
packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
|
|
24
22
|
configDir,
|
|
25
23
|
docs,
|
|
26
24
|
loglevel,
|
|
@@ -54,5 +52,5 @@ async function setup(options, context) {
|
|
|
54
52
|
};
|
|
55
53
|
}
|
|
56
54
|
function runInstance(options) {
|
|
57
|
-
return (0, rxjs_1.from)((0,
|
|
55
|
+
return (0, rxjs_1.from)((0, core_server_1.buildStaticStandalone)(options)).pipe((0, operators_1.catchError)((error) => (0, rxjs_1.throwError)((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error))));
|
|
58
56
|
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const architect_1 = require("@angular-devkit/architect");
|
|
7
4
|
const rxjs_1 = require("rxjs");
|
|
8
5
|
const operators_1 = require("rxjs/operators");
|
|
9
6
|
const find_up_1 = require("find-up");
|
|
10
|
-
|
|
11
|
-
const
|
|
7
|
+
const read_pkg_up_1 = require("read-pkg-up");
|
|
8
|
+
const core_server_1 = require("@storybook/core-server");
|
|
12
9
|
const run_compodoc_1 = require("../utils/run-compodoc");
|
|
13
10
|
const build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
|
|
14
11
|
exports.default = (0, architect_1.createBuilder)(commandBuilder);
|
|
@@ -21,6 +18,7 @@ function commandBuilder(options, context) {
|
|
|
21
18
|
}), (0, operators_1.map)(({ tsConfig }) => {
|
|
22
19
|
const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, smokeTest, sslCa, sslCert, sslKey, } = options;
|
|
23
20
|
const standaloneOptions = {
|
|
21
|
+
packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
|
|
24
22
|
ci,
|
|
25
23
|
configDir,
|
|
26
24
|
docs,
|
|
@@ -61,6 +59,6 @@ async function setup(options, context) {
|
|
|
61
59
|
function runInstance(options) {
|
|
62
60
|
return new rxjs_1.Observable((observer) => {
|
|
63
61
|
// This Observable intentionally never complete, leaving the process running ;)
|
|
64
|
-
(0,
|
|
62
|
+
(0, core_server_1.buildDevStandalone)(options).then(() => observer.next(), (error) => observer.error((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error)));
|
|
65
63
|
});
|
|
66
64
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BuilderContext } from '@angular-devkit/architect';
|
|
2
|
+
import type { LoadOptions, CLIOptions, BuilderOptions } from '@storybook/core-common';
|
|
3
|
+
export declare type StandaloneOptions = Partial<CLIOptions & LoadOptions & BuilderOptions & {
|
|
4
|
+
mode?: 'static' | 'dev';
|
|
5
|
+
angularBrowserTarget?: string | null;
|
|
6
|
+
angularBuilderOptions?: Record<string, any> & {
|
|
7
|
+
styles?: any[];
|
|
8
|
+
stylePreprocessorOptions?: any;
|
|
9
|
+
};
|
|
10
|
+
angularBuilderContext?: BuilderContext | null;
|
|
11
|
+
tsConfig?: string;
|
|
12
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.6",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"prepare": "node ../../scripts/prepare.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
37
|
-
"@storybook/api": "7.0.0-alpha.
|
|
38
|
-
"@storybook/builder-webpack5": "7.0.0-alpha.
|
|
39
|
-
"@storybook/client-logger": "7.0.0-alpha.
|
|
40
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
41
|
-
"@storybook/core-common": "7.0.0-alpha.
|
|
42
|
-
"@storybook/core-events": "7.0.0-alpha.
|
|
43
|
-
"@storybook/core-server": "7.0.0-alpha.
|
|
36
|
+
"@storybook/addons": "7.0.0-alpha.6",
|
|
37
|
+
"@storybook/api": "7.0.0-alpha.6",
|
|
38
|
+
"@storybook/builder-webpack5": "7.0.0-alpha.6",
|
|
39
|
+
"@storybook/client-logger": "7.0.0-alpha.6",
|
|
40
|
+
"@storybook/core-client": "7.0.0-alpha.6",
|
|
41
|
+
"@storybook/core-common": "7.0.0-alpha.6",
|
|
42
|
+
"@storybook/core-events": "7.0.0-alpha.6",
|
|
43
|
+
"@storybook/core-server": "7.0.0-alpha.6",
|
|
44
44
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
45
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
46
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
45
|
+
"@storybook/docs-tools": "7.0.0-alpha.6",
|
|
46
|
+
"@storybook/node-logger": "7.0.0-alpha.6",
|
|
47
47
|
"@storybook/semver": "^7.3.2",
|
|
48
|
-
"@storybook/store": "7.0.0-alpha.
|
|
48
|
+
"@storybook/store": "7.0.0-alpha.6",
|
|
49
49
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
50
50
|
"@types/react": "^16.14.23",
|
|
51
51
|
"@types/react-dom": "^16.9.14",
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
"react": "^16.14.0",
|
|
63
63
|
"react-dom": "^16.14.0",
|
|
64
64
|
"read-pkg-up": "^7.0.1",
|
|
65
|
-
"regenerator-runtime": "^0.13.7",
|
|
66
65
|
"sass-loader": "^12.6.0",
|
|
67
66
|
"telejson": "^6.0.8",
|
|
68
67
|
"ts-dedent": "^2.0.0",
|
|
@@ -128,5 +127,5 @@
|
|
|
128
127
|
"access": "public"
|
|
129
128
|
},
|
|
130
129
|
"builders": "dist/types/builders/builders.json",
|
|
131
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "a88dcca40ba169a373bad33dd76e9a4bd4f1f5ec"
|
|
132
131
|
}
|
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
|
-
}
|