@storybook/angular 6.4.0-beta.20 → 6.4.0-beta.24
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/package.json +9 -9
- package/types-7-0.d.ts +1 -0
- package/dist/ts3.4/builders/build-storybook/index.d.ts +0 -12
- package/dist/ts3.4/builders/start-storybook/index.d.ts +0 -12
- package/dist/ts3.4/builders/utils/build-standalone-errors-handler.d.ts +0 -1
- package/dist/ts3.4/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/ts3.4/client/index.d.ts +0 -4
- package/dist/ts3.4/client/preview/angular/app.token.d.ts +0 -3
- package/dist/ts3.4/client/preview/angular/components/app.component.d.ts +0 -38
- package/dist/ts3.4/client/preview/angular/helpers.d.ts +0 -8
- package/dist/ts3.4/client/preview/angular-beta/AbstractRenderer.d.ts +0 -44
- package/dist/ts3.4/client/preview/angular-beta/CanvasRenderer.d.ts +0 -14
- package/dist/ts3.4/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -17
- package/dist/ts3.4/client/preview/angular-beta/DocsRenderer.d.ts +0 -14
- package/dist/ts3.4/client/preview/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/ts3.4/client/preview/angular-beta/StorybookModule.d.ts +0 -9
- package/dist/ts3.4/client/preview/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/ts3.4/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -9
- package/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -26
- package/dist/ts3.4/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/ts3.4/client/preview/angular-polyfills.d.ts +0 -41
- package/dist/ts3.4/client/preview/config.d.ts +0 -4
- package/dist/ts3.4/client/preview/decorateStory.d.ts +0 -3
- package/dist/ts3.4/client/preview/decorators.d.ts +0 -6
- package/dist/ts3.4/client/preview/globals.d.ts +0 -1
- package/dist/ts3.4/client/preview/index.d.ts +0 -25
- package/dist/ts3.4/client/preview/render.d.ts +0 -7
- package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -42
- package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.4/client/preview/types.d.ts +0 -29
- package/dist/ts3.4/demo/button.component.d.ts +0 -5
- package/dist/ts3.4/demo/welcome.component.d.ts +0 -4
- package/dist/ts3.4/public_api.d.ts +0 -1
- package/dist/ts3.4/renderer.d.ts +0 -4
- package/dist/ts3.4/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/ts3.4/server/angular-devkit-build-webpack.d.ts +0 -30
- package/dist/ts3.4/server/angular-read-workspace.d.ts +0 -13
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/create-fork-ts-checker-plugin.d.ts +0 -3
- package/dist/ts3.4/server/framework-preset-angular-cli.d.ts +0 -73
- package/dist/ts3.4/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/ts3.4/server/framework-preset-angular.d.ts +0 -4
- package/dist/ts3.4/server/index.d.ts +0 -1
- package/dist/ts3.4/server/ngx-template-loader/index.d.ts +0 -1
- package/dist/ts3.4/server/options.d.ts +0 -3
- package/dist/ts3.4/server/preset.d.ts +0 -3
- package/dist/ts3.4/server/ts_config.d.ts +0 -2
- package/dist/ts3.4/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/ts3.4/server/utils/module-is-available.d.ts +0 -1
- package/dist/ts3.4/server/utils/normalize-asset-patterns.d.ts +0 -6
- package/dist/ts3.4/server/utils/normalize-optimization.d.ts +0 -3
- package/dist/ts3.4/types/index.d.ts +0 -6
- package/dist/ts3.9/builders/build-storybook/index.d.ts +0 -12
- package/dist/ts3.9/builders/build-storybook/index.js +0 -114
- package/dist/ts3.9/builders/build-storybook/schema.json +0 -72
- package/dist/ts3.9/builders/builders.json +0 -14
- package/dist/ts3.9/builders/start-storybook/index.d.ts +0 -12
- package/dist/ts3.9/builders/start-storybook/index.js +0 -117
- package/dist/ts3.9/builders/start-storybook/schema.json +0 -99
- package/dist/ts3.9/builders/utils/build-standalone-errors-handler.d.ts +0 -1
- package/dist/ts3.9/builders/utils/build-standalone-errors-handler.js +0 -36
- package/dist/ts3.9/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/ts3.9/builders/utils/run-compodoc.js +0 -45
- package/dist/ts3.9/client/index.d.ts +0 -4
- package/dist/ts3.9/client/index.js +0 -28
- package/dist/ts3.9/client/preview/angular/app.token.d.ts +0 -3
- package/dist/ts3.9/client/preview/angular/app.token.js +0 -5
- package/dist/ts3.9/client/preview/angular/components/app.component.d.ts +0 -38
- package/dist/ts3.9/client/preview/angular/components/app.component.js +0 -146
- package/dist/ts3.9/client/preview/angular/helpers.d.ts +0 -8
- package/dist/ts3.9/client/preview/angular/helpers.js +0 -165
- package/dist/ts3.9/client/preview/angular-beta/AbstractRenderer.d.ts +0 -44
- package/dist/ts3.9/client/preview/angular-beta/AbstractRenderer.js +0 -215
- package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.d.ts +0 -14
- package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.js +0 -97
- package/dist/ts3.9/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -17
- package/dist/ts3.9/client/preview/angular-beta/ComputesTemplateFromComponent.js +0 -112
- package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.d.ts +0 -14
- package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.js +0 -145
- package/dist/ts3.9/client/preview/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/ts3.9/client/preview/angular-beta/RendererFactory.js +0 -101
- package/dist/ts3.9/client/preview/angular-beta/StorybookModule.d.ts +0 -9
- package/dist/ts3.9/client/preview/angular-beta/StorybookModule.js +0 -78
- package/dist/ts3.9/client/preview/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/ts3.9/client/preview/angular-beta/StorybookProvider.js +0 -27
- package/dist/ts3.9/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -9
- package/dist/ts3.9/client/preview/angular-beta/StorybookWrapperComponent.js +0 -155
- package/dist/ts3.9/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -26
- package/dist/ts3.9/client/preview/angular-beta/utils/NgComponentAnalyzer.js +0 -124
- package/dist/ts3.9/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/ts3.9/client/preview/angular-beta/utils/NgModulesAnalyzer.js +0 -44
- package/dist/ts3.9/client/preview/angular-polyfills.d.ts +0 -41
- package/dist/ts3.9/client/preview/angular-polyfills.js +0 -61
- package/dist/ts3.9/client/preview/config.d.ts +0 -4
- package/dist/ts3.9/client/preview/config.js +0 -7
- package/dist/ts3.9/client/preview/decorateStory.d.ts +0 -3
- package/dist/ts3.9/client/preview/decorateStory.js +0 -62
- package/dist/ts3.9/client/preview/decorators.d.ts +0 -6
- package/dist/ts3.9/client/preview/decorators.js +0 -49
- package/dist/ts3.9/client/preview/globals.d.ts +0 -1
- package/dist/ts3.9/client/preview/globals.js +0 -9
- package/dist/ts3.9/client/preview/index.d.ts +0 -25
- package/dist/ts3.9/client/preview/index.js +0 -40
- package/dist/ts3.9/client/preview/render.d.ts +0 -7
- package/dist/ts3.9/client/preview/render.js +0 -73
- package/dist/ts3.9/client/preview/types-6-0.d.ts +0 -42
- package/dist/ts3.9/client/preview/types-6-0.js +0 -2
- package/dist/ts3.9/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.9/client/preview/types-7-0.js +0 -2
- package/dist/ts3.9/client/preview/types.d.ts +0 -29
- package/dist/ts3.9/client/preview/types.js +0 -2
- package/dist/ts3.9/demo/button.component.d.ts +0 -5
- package/dist/ts3.9/demo/button.component.js +0 -37
- package/dist/ts3.9/demo/welcome.component.d.ts +0 -4
- package/dist/ts3.9/demo/welcome.component.js +0 -32
- package/dist/ts3.9/public_api.d.ts +0 -1
- package/dist/ts3.9/public_api.js +0 -24
- package/dist/ts3.9/renderer.d.ts +0 -4
- package/dist/ts3.9/renderer.js +0 -10
- package/dist/ts3.9/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -4
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -17
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -9
- package/dist/ts3.9/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -13
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/angular.json +0 -18
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -9
- package/dist/ts3.9/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -13
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -60
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -9
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -13
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/angular.json +0 -28
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -25
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -13
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/angular.json +0 -17
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/nx.json +0 -3
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -8
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -14
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -3
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -8
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -14
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -17
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -17
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -9
- package/dist/ts3.9/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -13
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -11
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -7
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -3
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -25
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -13
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -16
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -5
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -9
- package/dist/ts3.9/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -13
- package/dist/ts3.9/server/angular-devkit-build-webpack.d.ts +0 -30
- package/dist/ts3.9/server/angular-devkit-build-webpack.js +0 -213
- package/dist/ts3.9/server/angular-read-workspace.d.ts +0 -13
- package/dist/ts3.9/server/angular-read-workspace.js +0 -118
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/build.js +0 -65
- package/dist/ts3.9/server/create-fork-ts-checker-plugin.d.ts +0 -3
- package/dist/ts3.9/server/create-fork-ts-checker-plugin.js +0 -19
- package/dist/ts3.9/server/framework-preset-angular-cli.d.ts +0 -73
- package/dist/ts3.9/server/framework-preset-angular-cli.js +0 -159
- package/dist/ts3.9/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/ts3.9/server/framework-preset-angular-ivy.js +0 -111
- package/dist/ts3.9/server/framework-preset-angular.d.ts +0 -4
- package/dist/ts3.9/server/framework-preset-angular.js +0 -74
- package/dist/ts3.9/server/index.d.ts +0 -1
- package/dist/ts3.9/server/index.js +0 -8
- package/dist/ts3.9/server/ngx-template-loader/index.d.ts +0 -1
- package/dist/ts3.9/server/ngx-template-loader/index.js +0 -46
- package/dist/ts3.9/server/options.d.ts +0 -3
- package/dist/ts3.9/server/options.js +0 -8
- package/dist/ts3.9/server/preset.d.ts +0 -3
- package/dist/ts3.9/server/preset.js +0 -21
- package/dist/ts3.9/server/ts_config.d.ts +0 -2
- package/dist/ts3.9/server/ts_config.js +0 -28
- package/dist/ts3.9/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/ts3.9/server/utils/filter-out-styling-rules.js +0 -16
- package/dist/ts3.9/server/utils/module-is-available.d.ts +0 -1
- package/dist/ts3.9/server/utils/module-is-available.js +0 -12
- package/dist/ts3.9/server/utils/normalize-asset-patterns.d.ts +0 -6
- package/dist/ts3.9/server/utils/normalize-asset-patterns.js +0 -79
- package/dist/ts3.9/server/utils/normalize-optimization.d.ts +0 -3
- package/dist/ts3.9/server/utils/normalize-optimization.js +0 -20
- package/dist/ts3.9/types/index.d.ts +0 -6
- package/dist/ts3.9/types/index.js +0 -2
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file is to be watched !
|
|
4
|
-
* The code must be compatible from @angular-devkit version 6.1.0 to the latest supported
|
|
5
|
-
*
|
|
6
|
-
* It uses code block of angular cli to extract parts of webpack configuration
|
|
7
|
-
*/
|
|
8
|
-
var __assign = (this && this.__assign) || function () {
|
|
9
|
-
__assign = Object.assign || function(t) {
|
|
10
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11
|
-
s = arguments[i];
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
}
|
|
15
|
-
return t;
|
|
16
|
-
};
|
|
17
|
-
return __assign.apply(this, arguments);
|
|
18
|
-
};
|
|
19
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
20
|
-
if (k2 === undefined) k2 = k;
|
|
21
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
22
|
-
}) : (function(o, m, k, k2) {
|
|
23
|
-
if (k2 === undefined) k2 = k;
|
|
24
|
-
o[k2] = m[k];
|
|
25
|
-
}));
|
|
26
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
-
}) : function(o, v) {
|
|
29
|
-
o["default"] = v;
|
|
30
|
-
});
|
|
31
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
32
|
-
if (mod && mod.__esModule) return mod;
|
|
33
|
-
var result = {};
|
|
34
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
35
|
-
__setModuleDefault(result, mod);
|
|
36
|
-
return result;
|
|
37
|
-
};
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
48
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
49
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
50
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
51
|
-
function step(op) {
|
|
52
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
53
|
-
while (_) try {
|
|
54
|
-
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;
|
|
55
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
56
|
-
switch (op[0]) {
|
|
57
|
-
case 0: case 1: t = op; break;
|
|
58
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
59
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
60
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
61
|
-
default:
|
|
62
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
63
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
64
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
65
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
66
|
-
if (t[2]) _.ops.pop();
|
|
67
|
-
_.trys.pop(); continue;
|
|
68
|
-
}
|
|
69
|
-
op = body.call(thisArg, _);
|
|
70
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
71
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
75
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
76
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
77
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
78
|
-
r[k] = a[j];
|
|
79
|
-
return r;
|
|
80
|
-
};
|
|
81
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
82
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
83
|
-
};
|
|
84
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
85
|
-
exports.extractAngularCliWebpackConfig = void 0;
|
|
86
|
-
var path_1 = __importDefault(require("path"));
|
|
87
|
-
var core_1 = require("@angular-devkit/core");
|
|
88
|
-
var node_1 = require("@angular-devkit/core/node");
|
|
89
|
-
var module_is_available_1 = require("./utils/module-is-available");
|
|
90
|
-
var normalize_asset_patterns_1 = require("./utils/normalize-asset-patterns");
|
|
91
|
-
var normalize_optimization_1 = require("./utils/normalize-optimization");
|
|
92
|
-
var importAngularCliWebpackConfigGenerator = function () {
|
|
93
|
-
var angularWebpackConfig;
|
|
94
|
-
// First we look for webpack config according to directory structure of Angular 11
|
|
95
|
-
if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/webpack/configs')) {
|
|
96
|
-
// eslint-disable-next-line global-require
|
|
97
|
-
angularWebpackConfig = require('@angular-devkit/build-angular/src/webpack/configs');
|
|
98
|
-
}
|
|
99
|
-
// We fallback on directory structure of Angular 10 (and below)
|
|
100
|
-
else if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs')) {
|
|
101
|
-
// eslint-disable-next-line global-require
|
|
102
|
-
angularWebpackConfig = require('@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs');
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
throw new Error('Webpack config not found in "@angular-devkit/build-angular"');
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
getCommonConfig: angularWebpackConfig.getCommonConfig,
|
|
109
|
-
getStylesConfig: angularWebpackConfig.getStylesConfig,
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
var importAngularCliReadTsconfigUtil = function () {
|
|
113
|
-
// First we look for webpack config according to directory structure of Angular 11
|
|
114
|
-
if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/utils/read-tsconfig')) {
|
|
115
|
-
// eslint-disable-next-line global-require
|
|
116
|
-
return require('@angular-devkit/build-angular/src/utils/read-tsconfig');
|
|
117
|
-
}
|
|
118
|
-
// We fallback on directory structure of Angular 10 (and below)
|
|
119
|
-
if (module_is_available_1.moduleIsAvailable('@angular-devkit/build-angular/src/angular-cli-files/utilities/read-tsconfig')) {
|
|
120
|
-
// eslint-disable-next-line global-require
|
|
121
|
-
return require('@angular-devkit/build-angular/src/angular-cli-files/utilities/read-tsconfig');
|
|
122
|
-
}
|
|
123
|
-
throw new Error('ReadTsconfig not found in "@angular-devkit/build-angular"');
|
|
124
|
-
};
|
|
125
|
-
var buildWebpackConfigOptions = function (dirToSearch, project, target, confName) { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
|
-
var conf, projectBuildOptions, requiredOptions, workspaceRootNormalized, projectRootNormalized, sourceRootNormalized, tsConfigPath, tsConfig, ts, scriptTarget, buildOptions;
|
|
127
|
-
return __generator(this, function (_a) {
|
|
128
|
-
switch (_a.label) {
|
|
129
|
-
case 0:
|
|
130
|
-
conf = {};
|
|
131
|
-
if (confName) {
|
|
132
|
-
if (!target.configurations) {
|
|
133
|
-
throw new Error('Missing "configurations" section in project target');
|
|
134
|
-
}
|
|
135
|
-
if (!target.configurations[confName]) {
|
|
136
|
-
throw new Error("Missing required configuration in project target. Check \"" + confName + "\"");
|
|
137
|
-
}
|
|
138
|
-
conf = target.configurations[confName];
|
|
139
|
-
}
|
|
140
|
-
projectBuildOptions = __assign(__assign({}, target.options), conf);
|
|
141
|
-
requiredOptions = ['tsConfig'];
|
|
142
|
-
if (!requiredOptions.every(function (key) { return !!projectBuildOptions[key]; })) {
|
|
143
|
-
throw new Error("Missing required options in project target. Check \"" + requiredOptions.join(', ') + "\"");
|
|
144
|
-
}
|
|
145
|
-
workspaceRootNormalized = core_1.normalize(dirToSearch);
|
|
146
|
-
projectRootNormalized = core_1.resolve(workspaceRootNormalized, core_1.normalize(project.root || ''));
|
|
147
|
-
sourceRootNormalized = project.sourceRoot
|
|
148
|
-
? core_1.resolve(workspaceRootNormalized, core_1.normalize(project.sourceRoot))
|
|
149
|
-
: undefined;
|
|
150
|
-
tsConfigPath = path_1.default.resolve(core_1.getSystemPath(workspaceRootNormalized), projectBuildOptions.tsConfig);
|
|
151
|
-
tsConfig = importAngularCliReadTsconfigUtil().readTsconfig(tsConfigPath);
|
|
152
|
-
return [4 /*yield*/, Promise.resolve().then(function () { return __importStar(require('typescript')); })];
|
|
153
|
-
case 1:
|
|
154
|
-
ts = _a.sent();
|
|
155
|
-
scriptTarget = tsConfig.options.target || ts.ScriptTarget.ES5;
|
|
156
|
-
buildOptions = __assign(__assign({
|
|
157
|
-
// Default options
|
|
158
|
-
budgets: [], fileReplacements: [], main: '', outputPath: 'dist/storybook-angular', scripts: [], sourceMap: {}, styles: [], lazyModules: [] }, projectBuildOptions), { assets: normalize_asset_patterns_1.normalizeAssetPatterns(projectBuildOptions.assets || [], workspaceRootNormalized, projectRootNormalized, sourceRootNormalized), optimization: normalize_optimization_1.normalizeOptimization(projectBuildOptions.optimization),
|
|
159
|
-
// Forced options
|
|
160
|
-
statsJson: false, forkTypeChecker: false });
|
|
161
|
-
return [2 /*return*/, {
|
|
162
|
-
root: core_1.getSystemPath(workspaceRootNormalized),
|
|
163
|
-
// The dependency of `@angular-devkit/build-angular` to `@angular-devkit/core` is not exactly the same version as the one for storybook (node modules of node modules ^^)
|
|
164
|
-
logger: node_1.createConsoleLogger(),
|
|
165
|
-
projectRoot: core_1.getSystemPath(projectRootNormalized),
|
|
166
|
-
sourceRoot: core_1.getSystemPath(sourceRootNormalized),
|
|
167
|
-
buildOptions: buildOptions,
|
|
168
|
-
tsConfig: tsConfig,
|
|
169
|
-
tsConfigPath: tsConfigPath,
|
|
170
|
-
scriptTarget: scriptTarget,
|
|
171
|
-
}];
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
}); };
|
|
175
|
-
/**
|
|
176
|
-
* Uses angular cli to extract webpack configuration.
|
|
177
|
-
* The `AngularCliWebpackConfig` type lists the parts used by storybook
|
|
178
|
-
*/
|
|
179
|
-
function extractAngularCliWebpackConfig(dirToSearch, project, target, confName) {
|
|
180
|
-
var _a;
|
|
181
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
182
|
-
var _b, getCommonConfig, getStylesConfig, webpackConfigOptions, cliCommonConfig, cliStyleConfig;
|
|
183
|
-
return __generator(this, function (_c) {
|
|
184
|
-
switch (_c.label) {
|
|
185
|
-
case 0:
|
|
186
|
-
_b = importAngularCliWebpackConfigGenerator(), getCommonConfig = _b.getCommonConfig, getStylesConfig = _b.getStylesConfig;
|
|
187
|
-
return [4 /*yield*/, buildWebpackConfigOptions(dirToSearch, project, target, confName)];
|
|
188
|
-
case 1:
|
|
189
|
-
webpackConfigOptions = _c.sent();
|
|
190
|
-
cliCommonConfig = getCommonConfig(webpackConfigOptions);
|
|
191
|
-
cliStyleConfig = getStylesConfig(webpackConfigOptions);
|
|
192
|
-
return [2 /*return*/, {
|
|
193
|
-
cliCommonWebpackConfig: {
|
|
194
|
-
plugins: cliCommonConfig.plugins,
|
|
195
|
-
resolve: {
|
|
196
|
-
modules: (_a = cliCommonConfig.resolve) === null || _a === void 0 ? void 0 : _a.modules,
|
|
197
|
-
},
|
|
198
|
-
resolveLoader: cliCommonConfig.resolveLoader,
|
|
199
|
-
},
|
|
200
|
-
cliStyleWebpackConfig: {
|
|
201
|
-
entry: cliStyleConfig.entry,
|
|
202
|
-
module: {
|
|
203
|
-
rules: __spreadArrays(cliStyleConfig.module.rules),
|
|
204
|
-
},
|
|
205
|
-
plugins: cliStyleConfig.plugins,
|
|
206
|
-
},
|
|
207
|
-
tsConfigPath: webpackConfigOptions.tsConfigPath,
|
|
208
|
-
}];
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
exports.extractAngularCliWebpackConfig = extractAngularCliWebpackConfig;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { workspaces } from '@angular-devkit/core';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the workspace definition
|
|
4
|
-
*
|
|
5
|
-
* - Either from NX if it is present
|
|
6
|
-
* - Either from `@angular-devkit/core` -> https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/core
|
|
7
|
-
*/
|
|
8
|
-
export declare const readAngularWorkspaceConfig: (dirToSearch: string) => Promise<workspaces.WorkspaceDefinition>;
|
|
9
|
-
export declare const getDefaultProjectName: (workspace: workspaces.WorkspaceDefinition) => string;
|
|
10
|
-
export declare const findAngularProjectTarget: (workspace: workspaces.WorkspaceDefinition, projectName: string, targetName: string) => {
|
|
11
|
-
project: workspaces.ProjectDefinition;
|
|
12
|
-
target: workspaces.TargetDefinition;
|
|
13
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.findAngularProjectTarget = exports.getDefaultProjectName = exports.readAngularWorkspaceConfig = void 0;
|
|
40
|
-
var node_1 = require("@angular-devkit/core/node");
|
|
41
|
-
var core_1 = require("@angular-devkit/core");
|
|
42
|
-
/**
|
|
43
|
-
* Returns the workspace definition
|
|
44
|
-
*
|
|
45
|
-
* - Either from NX if it is present
|
|
46
|
-
* - Either from `@angular-devkit/core` -> https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/core
|
|
47
|
-
*/
|
|
48
|
-
exports.readAngularWorkspaceConfig = function (dirToSearch) { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
-
var host, nxWorkspace_1;
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0:
|
|
53
|
-
host = core_1.workspaces.createWorkspaceHost(new node_1.NodeJsSyncHost());
|
|
54
|
-
try {
|
|
55
|
-
/**
|
|
56
|
-
* Apologies for the following line
|
|
57
|
-
* If there's a better way to do it, let's do it
|
|
58
|
-
*/
|
|
59
|
-
/* eslint-disable global-require */
|
|
60
|
-
// catch if nx.json does not exist
|
|
61
|
-
require('@nrwl/workspace').readNxJson();
|
|
62
|
-
nxWorkspace_1 = require('@nrwl/workspace').readWorkspaceConfig({
|
|
63
|
-
format: 'angularCli',
|
|
64
|
-
path: dirToSearch,
|
|
65
|
-
});
|
|
66
|
-
// Use the workspace version of nx when angular looks for the angular.json file
|
|
67
|
-
host.readFile = function (path) {
|
|
68
|
-
if (typeof path === 'string' && path.endsWith('angular.json')) {
|
|
69
|
-
return Promise.resolve(JSON.stringify(nxWorkspace_1));
|
|
70
|
-
}
|
|
71
|
-
return host.readFile(path);
|
|
72
|
-
};
|
|
73
|
-
host.isFile = function (path) {
|
|
74
|
-
if (typeof path === 'string' && path.endsWith('angular.json')) {
|
|
75
|
-
return Promise.resolve(true);
|
|
76
|
-
}
|
|
77
|
-
return host.isFile(path);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
catch (e) {
|
|
81
|
-
// Ignore if the client does not use NX
|
|
82
|
-
}
|
|
83
|
-
return [4 /*yield*/, core_1.workspaces.readWorkspace(dirToSearch, host)];
|
|
84
|
-
case 1: return [2 /*return*/, (_a.sent()).workspace];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
exports.getDefaultProjectName = function (workspace) {
|
|
89
|
-
var environmentProjectName = process.env.STORYBOOK_ANGULAR_PROJECT;
|
|
90
|
-
if (environmentProjectName) {
|
|
91
|
-
return environmentProjectName;
|
|
92
|
-
}
|
|
93
|
-
if (workspace.projects.has('storybook')) {
|
|
94
|
-
return 'storybook';
|
|
95
|
-
}
|
|
96
|
-
if (workspace.extensions.defaultProject) {
|
|
97
|
-
return workspace.extensions.defaultProject;
|
|
98
|
-
}
|
|
99
|
-
var firstProjectName = workspace.projects.keys().next().value;
|
|
100
|
-
if (firstProjectName) {
|
|
101
|
-
return firstProjectName;
|
|
102
|
-
}
|
|
103
|
-
throw new Error('No angular projects found');
|
|
104
|
-
};
|
|
105
|
-
exports.findAngularProjectTarget = function (workspace, projectName, targetName) {
|
|
106
|
-
if (!workspace.projects || !Object.keys(workspace.projects).length) {
|
|
107
|
-
throw new Error('No angular projects found');
|
|
108
|
-
}
|
|
109
|
-
var project = workspace.projects.get(projectName);
|
|
110
|
-
if (!project) {
|
|
111
|
-
throw new Error("\"" + projectName + "\" project is not found in angular.json");
|
|
112
|
-
}
|
|
113
|
-
if (!project.targets.has(targetName)) {
|
|
114
|
-
throw new Error("\"" + targetName + "\" target is not found in \"" + projectName + "\" project");
|
|
115
|
-
}
|
|
116
|
-
var target = project.targets.get(targetName);
|
|
117
|
-
return { project: project, target: target };
|
|
118
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var server_1 = require("@storybook/core/server");
|
|
43
|
-
var node_logger_1 = require("@storybook/node-logger");
|
|
44
|
-
var options_1 = __importDefault(require("./options"));
|
|
45
|
-
function build() {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
47
|
-
var error_1;
|
|
48
|
-
return __generator(this, function (_a) {
|
|
49
|
-
switch (_a.label) {
|
|
50
|
-
case 0:
|
|
51
|
-
_a.trys.push([0, 2, , 3]);
|
|
52
|
-
return [4 /*yield*/, server_1.buildStatic(options_1.default)];
|
|
53
|
-
case 1:
|
|
54
|
-
_a.sent();
|
|
55
|
-
return [3 /*break*/, 3];
|
|
56
|
-
case 2:
|
|
57
|
-
error_1 = _a.sent();
|
|
58
|
-
node_logger_1.logger.error(error_1);
|
|
59
|
-
return [3 /*break*/, 3];
|
|
60
|
-
case 3: return [2 /*return*/];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
build();
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable func-names */
|
|
7
|
-
var fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
|
|
8
|
-
var node_logger_1 = require("@storybook/node-logger");
|
|
9
|
-
function default_1(tsLoaderOptions) {
|
|
10
|
-
if (tsLoaderOptions && tsLoaderOptions.configFile) {
|
|
11
|
-
return new fork_ts_checker_webpack_plugin_1.default({
|
|
12
|
-
tsconfig: tsLoaderOptions.configFile,
|
|
13
|
-
async: false,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
node_logger_1.logger.info('=> Using default options for ForkTsCheckerWebpackPlugin');
|
|
17
|
-
return new fork_ts_checker_webpack_plugin_1.default();
|
|
18
|
-
}
|
|
19
|
-
exports.default = default_1;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
|
|
3
|
-
import { Options as CoreOptions } from '@storybook/core-common';
|
|
4
|
-
export declare type Options = CoreOptions & {
|
|
5
|
-
angularBrowserTarget?: string;
|
|
6
|
-
tsConfig?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function webpackFinal(baseConfig: webpack.Configuration, options: Options): Promise<webpack.Configuration | {
|
|
9
|
-
entry: any[];
|
|
10
|
-
module: {
|
|
11
|
-
rules: webpack.RuleSetRule[];
|
|
12
|
-
noParse?: RegExp | RegExp[] | ((content: string) => boolean);
|
|
13
|
-
unknownContextRequest?: string;
|
|
14
|
-
unknownContextRecursive?: boolean;
|
|
15
|
-
unknownContextRegExp?: RegExp;
|
|
16
|
-
unknownContextCritical?: boolean;
|
|
17
|
-
exprContextRequest?: string;
|
|
18
|
-
exprContextRegExp?: RegExp;
|
|
19
|
-
exprContextRecursive?: boolean;
|
|
20
|
-
exprContextCritical?: boolean;
|
|
21
|
-
wrappedContextRegExp?: RegExp;
|
|
22
|
-
wrappedContextRecursive?: boolean;
|
|
23
|
-
wrappedContextCritical?: boolean;
|
|
24
|
-
strictExportPresence?: boolean;
|
|
25
|
-
};
|
|
26
|
-
plugins: webpack.Plugin[];
|
|
27
|
-
resolve: {
|
|
28
|
-
modules: string[];
|
|
29
|
-
plugins: TsconfigPathsPlugin[];
|
|
30
|
-
descriptionFiles?: string[];
|
|
31
|
-
mainFields?: string[] | string[][];
|
|
32
|
-
aliasFields?: string[] | string[][];
|
|
33
|
-
mainFiles?: string[];
|
|
34
|
-
extensions?: string[];
|
|
35
|
-
enforceExtension?: boolean;
|
|
36
|
-
alias?: {
|
|
37
|
-
[key: string]: string;
|
|
38
|
-
};
|
|
39
|
-
unsafeCache?: boolean | {};
|
|
40
|
-
cachePredicate?(data: {
|
|
41
|
-
path: string;
|
|
42
|
-
request: string;
|
|
43
|
-
}): boolean;
|
|
44
|
-
symlinks?: boolean;
|
|
45
|
-
cacheWithContext?: boolean;
|
|
46
|
-
roots?: string[];
|
|
47
|
-
};
|
|
48
|
-
resolveLoader: webpack.ResolveLoader;
|
|
49
|
-
mode?: "development" | "production" | "none";
|
|
50
|
-
name?: string;
|
|
51
|
-
context?: string;
|
|
52
|
-
devtool?: webpack.Options.Devtool;
|
|
53
|
-
output?: webpack.Output;
|
|
54
|
-
externals?: string | RegExp | webpack.ExternalsObjectElement | webpack.ExternalsFunctionElement | webpack.ExternalsElement[];
|
|
55
|
-
target?: "node" | "web" | "webworker" | "async-node" | "node-webkit" | "atom" | "electron" | "electron-renderer" | "electron-preload" | "electron-main" | ((compiler?: any) => void);
|
|
56
|
-
bail?: boolean;
|
|
57
|
-
profile?: boolean;
|
|
58
|
-
cache?: boolean | object;
|
|
59
|
-
watch?: boolean;
|
|
60
|
-
watchOptions?: webpack.ICompiler.WatchOptions;
|
|
61
|
-
node?: false | webpack.Node;
|
|
62
|
-
amd?: {
|
|
63
|
-
[moduleName: string]: boolean;
|
|
64
|
-
};
|
|
65
|
-
recordsPath?: string;
|
|
66
|
-
recordsInputPath?: string;
|
|
67
|
-
recordsOutputPath?: string;
|
|
68
|
-
stats?: webpack.Stats.ToStringOptions;
|
|
69
|
-
performance?: false | webpack.Options.Performance;
|
|
70
|
-
parallelism?: number;
|
|
71
|
-
optimization?: webpack.Options.Optimization;
|
|
72
|
-
devServer?: import("webpack-dev-server").Configuration;
|
|
73
|
-
}>;
|