From 5184a7af6773a2c0e50ee4aa84f3b540d98a1e45 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 5 Oct 2023 15:45:01 +0200 Subject: [PATCH] add more angular options webpackStatsJson previewUrl loglevel --- .../angular/src/builders/build-storybook/index.ts | 3 +++ .../src/builders/build-storybook/schema.json | 4 ++++ .../angular/src/builders/start-storybook/index.ts | 9 +++++++++ .../src/builders/start-storybook/schema.json | 14 ++++++++++++++ 4 files changed, 30 insertions(+) diff --git a/code/frameworks/angular/src/builders/build-storybook/index.ts b/code/frameworks/angular/src/builders/build-storybook/index.ts index a33b1f4b977..2c72b4d4696 100644 --- a/code/frameworks/angular/src/builders/build-storybook/index.ts +++ b/code/frameworks/angular/src/builders/build-storybook/index.ts @@ -49,6 +49,7 @@ export type StorybookBuilderOptions = JsonObject & { | 'webpackStatsJson' | 'disableTelemetry' | 'debugWebpack' + | 'previewUrl' >; export type StorybookBuilderOutput = JsonObject & BuilderOutput & { [key: string]: any }; @@ -90,6 +91,7 @@ const commandBuilder: BuilderHandlerFn = ( debugWebpack, disableTelemetry, assets, + previewUrl, } = options; const standaloneOptions: StandaloneBuildOptions = { @@ -111,6 +113,7 @@ const commandBuilder: BuilderHandlerFn = ( tsConfig, webpackStatsJson, debugWebpack, + previewUrl, }; return standaloneOptions; diff --git a/code/frameworks/angular/src/builders/build-storybook/schema.json b/code/frameworks/angular/src/builders/build-storybook/schema.json index 51f24c17a46..958e6ea7cc1 100644 --- a/code/frameworks/angular/src/builders/build-storybook/schema.json +++ b/code/frameworks/angular/src/builders/build-storybook/schema.json @@ -67,6 +67,10 @@ "description": "Write Webpack Stats JSON to disk", "default": false }, + "previewUrl": { + "type": "string", + "description": "Disables the default storybook preview and lets you use your own" + }, "styles": { "type": "array", "description": "Global styles to be included in the build.", diff --git a/code/frameworks/angular/src/builders/start-storybook/index.ts b/code/frameworks/angular/src/builders/start-storybook/index.ts index cff33f886fb..b9fabda386f 100644 --- a/code/frameworks/angular/src/builders/start-storybook/index.ts +++ b/code/frameworks/angular/src/builders/start-storybook/index.ts @@ -54,6 +54,9 @@ export type StorybookBuilderOptions = JsonObject & { | 'open' | 'docs' | 'debugWebpack' + | 'webpackStatsJson' + | 'loglevel' + | 'previewUrl' >; export type StorybookBuilderOutput = JsonObject & BuilderOutput & {}; @@ -105,6 +108,9 @@ const commandBuilder: BuilderHandlerFn = (options, cont initialPath, open, debugWebpack, + loglevel, + webpackStatsJson, + previewUrl, } = options; const standaloneOptions: StandaloneOptions = { @@ -133,6 +139,9 @@ const commandBuilder: BuilderHandlerFn = (options, cont initialPath, open, debugWebpack, + loglevel, + webpackStatsJson, + previewUrl, }; return standaloneOptions; diff --git a/code/frameworks/angular/src/builders/start-storybook/schema.json b/code/frameworks/angular/src/builders/start-storybook/schema.json index 78553109681..d44d9c9f4f1 100644 --- a/code/frameworks/angular/src/builders/start-storybook/schema.json +++ b/code/frameworks/angular/src/builders/start-storybook/schema.json @@ -128,6 +128,20 @@ "initialPath": { "type": "string", "description": "URL path to be appended when visiting Storybook for the first time" + }, + "webpackStatsJson": { + "type": "string", + "description": "Write Webpack Stats JSON to disk", + "default": false + }, + "previewUrl": { + "type": "string", + "description": "Disables the default storybook preview and lets you use your own" + }, + "loglevel": { + "type": "string", + "description": "Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent].", + "pattern": "(silly|verbose|info|warn|silent)" } }, "additionalProperties": false,