@storybook/angular 6.4.0-beta.24 → 6.4.0-beta.28
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.4/builders/build-storybook/index.d.ts +12 -0
- package/dist/ts3.4/builders/start-storybook/index.d.ts +12 -0
- package/dist/ts3.4/builders/utils/build-standalone-errors-handler.d.ts +1 -0
- package/dist/ts3.4/builders/utils/run-compodoc.d.ts +6 -0
- package/dist/ts3.4/client/index.d.ts +4 -0
- package/dist/ts3.4/client/preview/angular/app.token.d.ts +3 -0
- package/dist/ts3.4/client/preview/angular/components/app.component.d.ts +38 -0
- package/dist/ts3.4/client/preview/angular/helpers.d.ts +8 -0
- package/dist/ts3.4/client/preview/angular-beta/AbstractRenderer.d.ts +44 -0
- package/dist/ts3.4/client/preview/angular-beta/CanvasRenderer.d.ts +14 -0
- package/dist/ts3.4/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +17 -0
- package/dist/ts3.4/client/preview/angular-beta/DocsRenderer.d.ts +14 -0
- package/dist/ts3.4/client/preview/angular-beta/RendererFactory.d.ts +11 -0
- package/dist/ts3.4/client/preview/angular-beta/StorybookModule.d.ts +9 -0
- package/dist/ts3.4/client/preview/angular-beta/StorybookProvider.d.ts +5 -0
- package/dist/ts3.4/client/preview/angular-beta/StorybookWrapperComponent.d.ts +9 -0
- package/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +26 -0
- package/dist/ts3.4/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +6 -0
- package/dist/ts3.4/client/preview/angular-polyfills.d.ts +41 -0
- package/dist/ts3.4/client/preview/config.d.ts +5 -0
- package/dist/ts3.4/client/preview/decorateStory.d.ts +4 -0
- package/dist/ts3.4/client/preview/decorators.d.ts +6 -0
- package/dist/ts3.4/client/preview/globals.d.ts +1 -0
- package/dist/ts3.4/client/preview/index.d.ts +25 -0
- package/dist/ts3.4/client/preview/render.d.ts +7 -0
- package/dist/ts3.4/client/preview/types-6-0.d.ts +42 -0
- package/dist/ts3.4/client/preview/types-7-0.d.ts +9 -0
- package/dist/ts3.4/client/preview/types.d.ts +29 -0
- package/dist/ts3.4/demo/button.component.d.ts +5 -0
- package/dist/ts3.4/demo/welcome.component.d.ts +4 -0
- package/dist/ts3.4/public_api.d.ts +1 -0
- package/dist/ts3.4/renderer.d.ts +4 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/some-config/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +1 -0
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +1 -0
- package/dist/ts3.4/server/angular-devkit-build-webpack.d.ts +30 -0
- package/dist/ts3.4/server/angular-read-workspace.d.ts +13 -0
- package/dist/ts3.4/server/build.d.ts +1 -0
- package/dist/ts3.4/server/create-fork-ts-checker-plugin.d.ts +3 -0
- package/dist/ts3.4/server/framework-preset-angular-cli.d.ts +73 -0
- package/dist/ts3.4/server/framework-preset-angular-ivy.d.ts +10 -0
- package/dist/ts3.4/server/framework-preset-angular.d.ts +4 -0
- package/dist/ts3.4/server/index.d.ts +1 -0
- package/dist/ts3.4/server/ngx-template-loader/index.d.ts +1 -0
- package/dist/ts3.4/server/options.d.ts +3 -0
- package/dist/ts3.4/server/preset.d.ts +3 -0
- package/dist/ts3.4/server/ts_config.d.ts +2 -0
- package/dist/ts3.4/server/utils/filter-out-styling-rules.d.ts +2 -0
- package/dist/ts3.4/server/utils/module-is-available.d.ts +1 -0
- package/dist/ts3.4/server/utils/normalize-asset-patterns.d.ts +6 -0
- package/dist/ts3.4/server/utils/normalize-optimization.d.ts +3 -0
- package/dist/ts3.4/types/index.d.ts +6 -0
- package/dist/ts3.9/builders/build-storybook/index.d.ts +12 -0
- package/dist/ts3.9/builders/build-storybook/index.js +114 -0
- package/dist/ts3.9/builders/build-storybook/schema.json +72 -0
- package/dist/ts3.9/builders/builders.json +14 -0
- package/dist/ts3.9/builders/start-storybook/index.d.ts +12 -0
- package/dist/ts3.9/builders/start-storybook/index.js +117 -0
- package/dist/ts3.9/builders/start-storybook/schema.json +99 -0
- package/dist/ts3.9/builders/utils/build-standalone-errors-handler.d.ts +1 -0
- package/dist/ts3.9/builders/utils/build-standalone-errors-handler.js +36 -0
- package/dist/ts3.9/builders/utils/run-compodoc.d.ts +6 -0
- package/dist/ts3.9/builders/utils/run-compodoc.js +45 -0
- package/dist/ts3.9/client/index.d.ts +4 -0
- package/dist/ts3.9/client/index.js +28 -0
- package/dist/ts3.9/client/preview/angular/app.token.d.ts +3 -0
- package/dist/ts3.9/client/preview/angular/app.token.js +5 -0
- package/dist/ts3.9/client/preview/angular/components/app.component.d.ts +38 -0
- package/dist/ts3.9/client/preview/angular/components/app.component.js +146 -0
- package/dist/ts3.9/client/preview/angular/helpers.d.ts +8 -0
- package/dist/ts3.9/client/preview/angular/helpers.js +165 -0
- package/dist/ts3.9/client/preview/angular-beta/AbstractRenderer.d.ts +44 -0
- package/dist/ts3.9/client/preview/angular-beta/AbstractRenderer.js +215 -0
- package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.d.ts +14 -0
- package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.js +97 -0
- package/dist/ts3.9/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +17 -0
- package/dist/ts3.9/client/preview/angular-beta/ComputesTemplateFromComponent.js +112 -0
- package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.d.ts +14 -0
- package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.js +145 -0
- package/dist/ts3.9/client/preview/angular-beta/RendererFactory.d.ts +11 -0
- package/dist/ts3.9/client/preview/angular-beta/RendererFactory.js +101 -0
- package/dist/ts3.9/client/preview/angular-beta/StorybookModule.d.ts +9 -0
- package/dist/ts3.9/client/preview/angular-beta/StorybookModule.js +78 -0
- package/dist/ts3.9/client/preview/angular-beta/StorybookProvider.d.ts +5 -0
- package/dist/ts3.9/client/preview/angular-beta/StorybookProvider.js +27 -0
- package/dist/ts3.9/client/preview/angular-beta/StorybookWrapperComponent.d.ts +9 -0
- package/dist/ts3.9/client/preview/angular-beta/StorybookWrapperComponent.js +155 -0
- package/dist/ts3.9/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +26 -0
- package/dist/ts3.9/client/preview/angular-beta/utils/NgComponentAnalyzer.js +124 -0
- package/dist/ts3.9/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +6 -0
- package/dist/ts3.9/client/preview/angular-beta/utils/NgModulesAnalyzer.js +44 -0
- package/dist/ts3.9/client/preview/angular-polyfills.d.ts +41 -0
- package/dist/ts3.9/client/preview/angular-polyfills.js +61 -0
- package/dist/ts3.9/client/preview/config.d.ts +5 -0
- package/dist/ts3.9/client/preview/config.js +9 -0
- package/dist/ts3.9/client/preview/decorateStory.d.ts +4 -0
- package/dist/ts3.9/client/preview/decorateStory.js +64 -0
- package/dist/ts3.9/client/preview/decorators.d.ts +6 -0
- package/dist/ts3.9/client/preview/decorators.js +49 -0
- package/dist/ts3.9/client/preview/globals.d.ts +1 -0
- package/dist/ts3.9/client/preview/globals.js +9 -0
- package/dist/ts3.9/client/preview/index.d.ts +25 -0
- package/dist/ts3.9/client/preview/index.js +40 -0
- package/dist/ts3.9/client/preview/render.d.ts +7 -0
- package/dist/ts3.9/client/preview/render.js +73 -0
- package/dist/ts3.9/client/preview/types-6-0.d.ts +42 -0
- package/dist/ts3.9/client/preview/types-6-0.js +2 -0
- package/dist/ts3.9/client/preview/types-7-0.d.ts +9 -0
- package/dist/ts3.9/client/preview/types-7-0.js +2 -0
- package/dist/ts3.9/client/preview/types.d.ts +29 -0
- package/dist/ts3.9/client/preview/types.js +2 -0
- package/dist/ts3.9/demo/button.component.d.ts +5 -0
- package/dist/ts3.9/demo/button.component.js +37 -0
- package/dist/ts3.9/demo/welcome.component.d.ts +4 -0
- package/dist/ts3.9/demo/welcome.component.js +32 -0
- package/dist/ts3.9/public_api.d.ts +1 -0
- package/dist/ts3.9/public_api.js +24 -0
- package/dist/ts3.9/renderer.d.ts +4 -0
- package/dist/ts3.9/renderer.js +10 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +4 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/angular.json +17 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +9 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +13 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/angular.json +18 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +9 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/tsconfig.json +13 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +60 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +9 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +13 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/angular.json +28 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +25 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/tsconfig.json +13 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/angular.json +17 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/nx.json +3 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +8 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/tsconfig.json +14 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +3 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +8 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +14 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +17 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/angular.json +17 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +9 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +13 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-architect-build/angular.json +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +11 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +7 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/angular.json +3 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +25 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +13 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/angular.json +16 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +1 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +5 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +9 -0
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +13 -0
- package/dist/ts3.9/server/angular-devkit-build-webpack.d.ts +30 -0
- package/dist/ts3.9/server/angular-devkit-build-webpack.js +213 -0
- package/dist/ts3.9/server/angular-read-workspace.d.ts +13 -0
- package/dist/ts3.9/server/angular-read-workspace.js +118 -0
- package/dist/ts3.9/server/build.d.ts +1 -0
- package/dist/ts3.9/server/build.js +65 -0
- package/dist/ts3.9/server/create-fork-ts-checker-plugin.d.ts +3 -0
- package/dist/ts3.9/server/create-fork-ts-checker-plugin.js +19 -0
- package/dist/ts3.9/server/framework-preset-angular-cli.d.ts +73 -0
- package/dist/ts3.9/server/framework-preset-angular-cli.js +159 -0
- package/dist/ts3.9/server/framework-preset-angular-ivy.d.ts +10 -0
- package/dist/ts3.9/server/framework-preset-angular-ivy.js +111 -0
- package/dist/ts3.9/server/framework-preset-angular.d.ts +4 -0
- package/dist/ts3.9/server/framework-preset-angular.js +74 -0
- package/dist/ts3.9/server/index.d.ts +1 -0
- package/dist/ts3.9/server/index.js +8 -0
- package/dist/ts3.9/server/ngx-template-loader/index.d.ts +1 -0
- package/dist/ts3.9/server/ngx-template-loader/index.js +46 -0
- package/dist/ts3.9/server/options.d.ts +3 -0
- package/dist/ts3.9/server/options.js +8 -0
- package/dist/ts3.9/server/preset.d.ts +3 -0
- package/dist/ts3.9/server/preset.js +21 -0
- package/dist/ts3.9/server/ts_config.d.ts +2 -0
- package/dist/ts3.9/server/ts_config.js +28 -0
- package/dist/ts3.9/server/utils/filter-out-styling-rules.d.ts +2 -0
- package/dist/ts3.9/server/utils/filter-out-styling-rules.js +16 -0
- package/dist/ts3.9/server/utils/module-is-available.d.ts +1 -0
- package/dist/ts3.9/server/utils/module-is-available.js +12 -0
- package/dist/ts3.9/server/utils/normalize-asset-patterns.d.ts +6 -0
- package/dist/ts3.9/server/utils/normalize-asset-patterns.js +79 -0
- package/dist/ts3.9/server/utils/normalize-optimization.d.ts +3 -0
- package/dist/ts3.9/server/utils/normalize-optimization.js +20 -0
- package/dist/ts3.9/types/index.d.ts +6 -0
- package/dist/ts3.9/types/index.js +2 -0
- package/package.json +9 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Configuration } from 'webpack';
|
|
2
|
+
import { Options } from './framework-preset-angular-cli';
|
|
3
|
+
/**
|
|
4
|
+
* Run ngcc for converting modules to ivy format before starting storybook
|
|
5
|
+
* This step is needed in order to support Ivy in storybook
|
|
6
|
+
*
|
|
7
|
+
* Information about Ivy can be found here https://angular.io/guide/ivy
|
|
8
|
+
*/
|
|
9
|
+
export declare const runNgcc: () => void;
|
|
10
|
+
export declare const webpack: (webpackConfig: Configuration, options: Options) => Promise<Configuration>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (source: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const moduleIsAvailable: (moduleName: string) => boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
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[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OptimizationUnion } from '@angular-devkit/build-angular/src/browser/schema';
|
|
2
|
+
import { NormalizedOptimizationOptions } from '@angular-devkit/build-angular/src/utils/normalize-optimization';
|
|
3
|
+
export declare const normalizeOptimization: (options: OptimizationUnion) => NormalizedOptimizationOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BuilderOutput } from '@angular-devkit/architect';
|
|
2
|
+
import { JsonObject } from '@angular-devkit/core';
|
|
3
|
+
import { CLIOptions } from '@storybook/core-common';
|
|
4
|
+
export declare type StorybookBuilderOptions = JsonObject & {
|
|
5
|
+
browserTarget?: string | null;
|
|
6
|
+
tsConfig?: string;
|
|
7
|
+
compodoc: boolean;
|
|
8
|
+
compodocArgs: string[];
|
|
9
|
+
} & Pick<CLIOptions, 'staticDir' | 'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'docs'>;
|
|
10
|
+
export declare type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
|
|
11
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<StorybookBuilderOptions>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
|
+
var t = {};
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
+
t[p] = s[p];
|
|
53
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
+
t[p[i]] = s[p[i]];
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
61
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
62
|
+
};
|
|
63
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
|
+
var architect_1 = require("@angular-devkit/architect");
|
|
65
|
+
var rxjs_1 = require("rxjs");
|
|
66
|
+
var operators_1 = require("rxjs/operators");
|
|
67
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
68
|
+
var standalone_1 = __importDefault(require("@storybook/angular/standalone"));
|
|
69
|
+
var run_compodoc_1 = require("../utils/run-compodoc");
|
|
70
|
+
var build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
|
|
71
|
+
exports.default = architect_1.createBuilder(commandBuilder);
|
|
72
|
+
function commandBuilder(options, context) {
|
|
73
|
+
return rxjs_1.from(setup(options, context)).pipe(operators_1.switchMap(function (_a) {
|
|
74
|
+
var tsConfig = _a.tsConfig;
|
|
75
|
+
var runCompodoc$ = options.compodoc
|
|
76
|
+
? run_compodoc_1.runCompodoc({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe(operators_1.mapTo({ tsConfig: tsConfig }))
|
|
77
|
+
: rxjs_1.of({});
|
|
78
|
+
return runCompodoc$.pipe(operators_1.mapTo({ tsConfig: tsConfig }));
|
|
79
|
+
}), operators_1.map(function (_a) {
|
|
80
|
+
var tsConfig = _a.tsConfig;
|
|
81
|
+
var browserTarget = options.browserTarget, otherOptions = __rest(options, ["browserTarget"]);
|
|
82
|
+
return __assign(__assign({}, otherOptions), { angularBrowserTarget: browserTarget, tsConfig: tsConfig });
|
|
83
|
+
}), operators_1.switchMap(function (standaloneOptions) { return runInstance(__assign(__assign({}, standaloneOptions), { mode: 'static' })); }), operators_1.map(function () {
|
|
84
|
+
return { success: true };
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
function setup(options, context) {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
+
var browserOptions, browserTarget, _c, _d, _e;
|
|
91
|
+
return __generator(this, function (_f) {
|
|
92
|
+
switch (_f.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
if (!options.browserTarget) return [3 /*break*/, 4];
|
|
95
|
+
browserTarget = architect_1.targetFromTargetString(options.browserTarget);
|
|
96
|
+
_d = (_c = context).validateOptions;
|
|
97
|
+
return [4 /*yield*/, context.getTargetOptions(browserTarget)];
|
|
98
|
+
case 1:
|
|
99
|
+
_e = [_f.sent()];
|
|
100
|
+
return [4 /*yield*/, context.getBuilderNameForTarget(browserTarget)];
|
|
101
|
+
case 2: return [4 /*yield*/, _d.apply(_c, _e.concat([_f.sent()]))];
|
|
102
|
+
case 3:
|
|
103
|
+
browserOptions = _f.sent();
|
|
104
|
+
_f.label = 4;
|
|
105
|
+
case 4: return [2 /*return*/, {
|
|
106
|
+
tsConfig: (_b = (_a = options.tsConfig) !== null && _a !== void 0 ? _a : browserOptions.tsConfig) !== null && _b !== void 0 ? _b : undefined,
|
|
107
|
+
}];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function runInstance(options) {
|
|
113
|
+
return rxjs_1.from(standalone_1.default(options)).pipe(operators_1.catchError(function (error) { return rxjs_1.throwError(build_standalone_errors_handler_1.buildStandaloneErrorHandler(error)); }));
|
|
114
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"title": "Build 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
|
+
"default": null
|
|
12
|
+
},
|
|
13
|
+
"tsConfig": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
|
16
|
+
},
|
|
17
|
+
"staticDir": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"description": "Directory where to load static files from, array of strings.",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"outputDir": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Directory where to store built files.",
|
|
27
|
+
"default": "storybook-static"
|
|
28
|
+
},
|
|
29
|
+
"configDir": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Directory where to load Storybook configurations from.",
|
|
32
|
+
"default": ".storybook"
|
|
33
|
+
},
|
|
34
|
+
"loglevel": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent].",
|
|
37
|
+
"pattern": "(silly|verbose|info|warn|silent)"
|
|
38
|
+
},
|
|
39
|
+
"quiet": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Suppress verbose build output.",
|
|
42
|
+
"default": false
|
|
43
|
+
},
|
|
44
|
+
"docsMode": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation.",
|
|
47
|
+
"default": false
|
|
48
|
+
},
|
|
49
|
+
"compodoc": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"description": "Execute compodoc before.",
|
|
52
|
+
"default": true
|
|
53
|
+
},
|
|
54
|
+
"compodocArgs": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"description": "Compodoc options : https://compodoc.app/guides/options.html. Options `-p` with tsconfig path and `-d` with workspace root is always given.",
|
|
57
|
+
"default": ["-e", "json"],
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"oneOf": [
|
|
65
|
+
{
|
|
66
|
+
"required": ["browserTarget"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"required": ["tsConfig"]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"builders": {
|
|
3
|
+
"build-storybook": {
|
|
4
|
+
"implementation": "./build-storybook",
|
|
5
|
+
"schema": "./build-storybook/schema.json",
|
|
6
|
+
"description": "Build storybook"
|
|
7
|
+
},
|
|
8
|
+
"start-storybook": {
|
|
9
|
+
"implementation": "./start-storybook",
|
|
10
|
+
"schema": "./start-storybook/schema.json",
|
|
11
|
+
"description": "Start storybook"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BuilderOutput } from '@angular-devkit/architect';
|
|
2
|
+
import { JsonObject } from '@angular-devkit/core';
|
|
3
|
+
import { CLIOptions } from '@storybook/core-common';
|
|
4
|
+
export declare type StorybookBuilderOptions = JsonObject & {
|
|
5
|
+
browserTarget?: string | null;
|
|
6
|
+
tsConfig?: string;
|
|
7
|
+
compodoc: boolean;
|
|
8
|
+
compodocArgs: string[];
|
|
9
|
+
} & Pick<CLIOptions, 'port' | 'host' | 'staticDir' | 'configDir' | 'https' | 'sslCa' | 'sslCert' | 'sslKey' | 'smokeTest' | 'ci' | 'quiet' | 'docs'>;
|
|
10
|
+
export declare type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
|
|
11
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<StorybookBuilderOptions>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
|
+
var t = {};
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
+
t[p] = s[p];
|
|
53
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
+
t[p[i]] = s[p[i]];
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
61
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
62
|
+
};
|
|
63
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
|
+
var architect_1 = require("@angular-devkit/architect");
|
|
65
|
+
var rxjs_1 = require("rxjs");
|
|
66
|
+
var operators_1 = require("rxjs/operators");
|
|
67
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
68
|
+
var standalone_1 = __importDefault(require("@storybook/angular/standalone"));
|
|
69
|
+
var run_compodoc_1 = require("../utils/run-compodoc");
|
|
70
|
+
var build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
|
|
71
|
+
exports.default = architect_1.createBuilder(commandBuilder);
|
|
72
|
+
function commandBuilder(options, context) {
|
|
73
|
+
return rxjs_1.from(setup(options, context)).pipe(operators_1.switchMap(function (_a) {
|
|
74
|
+
var tsConfig = _a.tsConfig;
|
|
75
|
+
var runCompodoc$ = options.compodoc
|
|
76
|
+
? run_compodoc_1.runCompodoc({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe(operators_1.mapTo({ tsConfig: tsConfig }))
|
|
77
|
+
: rxjs_1.of({});
|
|
78
|
+
return runCompodoc$.pipe(operators_1.mapTo({ tsConfig: tsConfig }));
|
|
79
|
+
}), operators_1.map(function (_a) {
|
|
80
|
+
var tsConfig = _a.tsConfig;
|
|
81
|
+
var browserTarget = options.browserTarget, otherOptions = __rest(options, ["browserTarget"]);
|
|
82
|
+
return __assign(__assign({}, otherOptions), { angularBrowserTarget: browserTarget, tsConfig: tsConfig });
|
|
83
|
+
}), operators_1.switchMap(function (standaloneOptions) { return runInstance(standaloneOptions); }), operators_1.map(function () {
|
|
84
|
+
return { success: true };
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
function setup(options, context) {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
+
var browserOptions, browserTarget, _c, _d, _e;
|
|
91
|
+
return __generator(this, function (_f) {
|
|
92
|
+
switch (_f.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
if (!options.browserTarget) return [3 /*break*/, 4];
|
|
95
|
+
browserTarget = architect_1.targetFromTargetString(options.browserTarget);
|
|
96
|
+
_d = (_c = context).validateOptions;
|
|
97
|
+
return [4 /*yield*/, context.getTargetOptions(browserTarget)];
|
|
98
|
+
case 1:
|
|
99
|
+
_e = [_f.sent()];
|
|
100
|
+
return [4 /*yield*/, context.getBuilderNameForTarget(browserTarget)];
|
|
101
|
+
case 2: return [4 /*yield*/, _d.apply(_c, _e.concat([_f.sent()]))];
|
|
102
|
+
case 3:
|
|
103
|
+
browserOptions = _f.sent();
|
|
104
|
+
_f.label = 4;
|
|
105
|
+
case 4: return [2 /*return*/, {
|
|
106
|
+
tsConfig: (_b = (_a = options.tsConfig) !== null && _a !== void 0 ? _a : browserOptions.tsConfig) !== null && _b !== void 0 ? _b : undefined,
|
|
107
|
+
}];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function runInstance(options) {
|
|
113
|
+
return new rxjs_1.Observable(function (observer) {
|
|
114
|
+
// This Observable intentionally never complete, leaving the process running ;)
|
|
115
|
+
standalone_1.default(options).then(function () { return observer.next(); }, function (error) { return observer.error(build_standalone_errors_handler_1.buildStandaloneErrorHandler(error)); });
|
|
116
|
+
});
|
|
117
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
"default": null
|
|
12
|
+
},
|
|
13
|
+
"tsConfig": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
|
16
|
+
},
|
|
17
|
+
"port": {
|
|
18
|
+
"type": "number",
|
|
19
|
+
"description": "Port to listen on.",
|
|
20
|
+
"default": 9009
|
|
21
|
+
},
|
|
22
|
+
"host": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Host to listen on.",
|
|
25
|
+
"default": "localhost"
|
|
26
|
+
},
|
|
27
|
+
"staticDir": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "Directory where to load static files from, array of strings.",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"configDir": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Directory where to load Storybook configurations from.",
|
|
37
|
+
"default": ".storybook"
|
|
38
|
+
},
|
|
39
|
+
"https": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Serve Storybook over HTTPS. Note: You must provide your own certificate information.",
|
|
42
|
+
"default": false
|
|
43
|
+
},
|
|
44
|
+
"sslCa": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)."
|
|
47
|
+
},
|
|
48
|
+
"sslCert": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Provide an SSL certificate. (Required with --https)."
|
|
51
|
+
},
|
|
52
|
+
"sslKey": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "SSL key to use for serving HTTPS."
|
|
55
|
+
},
|
|
56
|
+
"smokeTest": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"description": "Exit after successful start.",
|
|
59
|
+
"default": false
|
|
60
|
+
},
|
|
61
|
+
"ci": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"description": "CI mode (skip interactive prompts, don't open browser).",
|
|
64
|
+
"default": false
|
|
65
|
+
},
|
|
66
|
+
"quiet": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"description": "Suppress verbose build output.",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
71
|
+
"docsMode": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation.",
|
|
74
|
+
"default": false
|
|
75
|
+
},
|
|
76
|
+
"compodoc": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"description": "Execute compodoc before.",
|
|
79
|
+
"default": true
|
|
80
|
+
},
|
|
81
|
+
"compodocArgs": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"description": "Compodoc options : https://compodoc.app/guides/options.html. Options `-p` with tsconfig path and `-d` with workspace root is always given.",
|
|
84
|
+
"default": ["-e", "json"],
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"oneOf": [
|
|
92
|
+
{
|
|
93
|
+
"required": ["browserTarget"]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"required": ["tsConfig"]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildStandaloneErrorHandler: (error: any) => any;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.buildStandaloneErrorHandler = void 0;
|
|
11
|
+
var node_logger_1 = require("@storybook/node-logger");
|
|
12
|
+
var ts_dedent_1 = __importDefault(require("ts-dedent"));
|
|
13
|
+
exports.buildStandaloneErrorHandler = function (error) {
|
|
14
|
+
var _a;
|
|
15
|
+
// Duplicate code for Standalone error handling
|
|
16
|
+
// Source: https://github.com/storybookjs/storybook/blob/39c7ba09ad84fbd466f9c25d5b92791a5450b9f6/lib/core-server/src/build-dev.ts#L136
|
|
17
|
+
node_logger_1.instance.heading = '';
|
|
18
|
+
if (error instanceof Error) {
|
|
19
|
+
if (error.error) {
|
|
20
|
+
node_logger_1.logger.error(error.error);
|
|
21
|
+
}
|
|
22
|
+
else if (error.stats && error.stats.compilation.errors) {
|
|
23
|
+
error.stats.compilation.errors.forEach(function (e) { return node_logger_1.logger.plain(e); });
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
node_logger_1.logger.error(error);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if ((_a = error.compilation) === null || _a === void 0 ? void 0 : _a.errors) {
|
|
30
|
+
error.compilation.errors.forEach(function (e) { return node_logger_1.logger.plain(e); });
|
|
31
|
+
}
|
|
32
|
+
node_logger_1.logger.line();
|
|
33
|
+
return error.close
|
|
34
|
+
? ts_dedent_1.default(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n FATAL broken build!, will close the process,\n Fix the error below and restart storybook.\n "], ["\n FATAL broken build!, will close the process,\n Fix the error below and restart storybook.\n "]))) : ts_dedent_1.default(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n Broken build, fix the error above.\n You may need to refresh the browser.\n "], ["\n Broken build, fix the error above.\n You may need to refresh the browser.\n "])));
|
|
35
|
+
};
|
|
36
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
3
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
4
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
5
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
6
|
+
r[k] = a[j];
|
|
7
|
+
return r;
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.runCompodoc = void 0;
|
|
11
|
+
var child_process_1 = require("child_process");
|
|
12
|
+
var rxjs_1 = require("rxjs");
|
|
13
|
+
exports.runCompodoc = function (_a, context) {
|
|
14
|
+
var compodocArgs = _a.compodocArgs, tsconfig = _a.tsconfig;
|
|
15
|
+
return new rxjs_1.Observable(function (observer) {
|
|
16
|
+
var finalCompodocArgs = __spreadArrays([
|
|
17
|
+
// Default options
|
|
18
|
+
'-p',
|
|
19
|
+
tsconfig,
|
|
20
|
+
'-d',
|
|
21
|
+
"" + context.workspaceRoot
|
|
22
|
+
], compodocArgs);
|
|
23
|
+
try {
|
|
24
|
+
var child = child_process_1.spawn('compodoc', finalCompodocArgs);
|
|
25
|
+
child.stdout.on('data', function (data) {
|
|
26
|
+
context.logger.info(data.toString());
|
|
27
|
+
});
|
|
28
|
+
child.stderr.on('data', function (data) {
|
|
29
|
+
context.logger.error(data.toString());
|
|
30
|
+
});
|
|
31
|
+
child.on('close', function (code) {
|
|
32
|
+
if (code === 0) {
|
|
33
|
+
observer.next();
|
|
34
|
+
observer.complete();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
observer.error();
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
observer.error(error);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, } from './preview';
|
|
2
|
+
export * from './preview/types-6-0';
|
|
3
|
+
export type { StoryFnAngularReturnType as IStory } from './preview/types';
|
|
4
|
+
export { moduleMetadata, componentWrapperDecorator } from './preview/decorators';
|
|
@@ -0,0 +1,28 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
var preview_1 = require("./preview");
|
|
14
|
+
Object.defineProperty(exports, "storiesOf", { enumerable: true, get: function () { return preview_1.storiesOf; } });
|
|
15
|
+
Object.defineProperty(exports, "setAddon", { enumerable: true, get: function () { return preview_1.setAddon; } });
|
|
16
|
+
Object.defineProperty(exports, "addDecorator", { enumerable: true, get: function () { return preview_1.addDecorator; } });
|
|
17
|
+
Object.defineProperty(exports, "addParameters", { enumerable: true, get: function () { return preview_1.addParameters; } });
|
|
18
|
+
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return preview_1.configure; } });
|
|
19
|
+
Object.defineProperty(exports, "getStorybook", { enumerable: true, get: function () { return preview_1.getStorybook; } });
|
|
20
|
+
Object.defineProperty(exports, "forceReRender", { enumerable: true, get: function () { return preview_1.forceReRender; } });
|
|
21
|
+
Object.defineProperty(exports, "raw", { enumerable: true, get: function () { return preview_1.raw; } });
|
|
22
|
+
__exportStar(require("./preview/types-6-0"), exports);
|
|
23
|
+
var decorators_1 = require("./preview/decorators");
|
|
24
|
+
Object.defineProperty(exports, "moduleMetadata", { enumerable: true, get: function () { return decorators_1.moduleMetadata; } });
|
|
25
|
+
Object.defineProperty(exports, "componentWrapperDecorator", { enumerable: true, get: function () { return decorators_1.componentWrapperDecorator; } });
|
|
26
|
+
if (module && module.hot && module.hot.decline) {
|
|
27
|
+
module.hot.decline();
|
|
28
|
+
}
|