-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storybook): migrator to add projectBuildConfig
- Loading branch information
Showing
3 changed files
with
517 additions
and
0 deletions.
There are no files selected for viewing
231 changes: 231 additions & 0 deletions
231
...torybook/src/migrations/update-13-4-5/__snapshots__/set-project-build-config.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Set the projectBuildConfig option in the Storybook configuration for Angular projects for all types of angular projects - non-buildable and buildable libs/apps should set the projectBuildConfig in the Storybook config according to the type of project 1`] = ` | ||
Object { | ||
"projects": Object { | ||
"main-app": Object { | ||
"prefix": "katst", | ||
"projectType": "application", | ||
"root": "apps/main-app", | ||
"sourceRoot": "apps/main-app/src", | ||
"targets": Object { | ||
"build": Object { | ||
"executor": "@angular-devkit/build-angular:browser", | ||
"outputs": Array [ | ||
"{options.outputPath}", | ||
], | ||
}, | ||
"build-storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:build", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "apps/main-app/.storybook", | ||
}, | ||
"outputPath": "dist/storybook/main-app", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
"outputs": Array [ | ||
"{options.outputPath}", | ||
], | ||
}, | ||
"storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:storybook", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "apps/main-app/.storybook", | ||
}, | ||
"port": 4400, | ||
"projectBuildConfig": "main-app", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"ui-one": Object { | ||
"projectType": "library", | ||
"root": "libs/ui/one", | ||
"sourceRoot": "libs/ui/one/src", | ||
"targets": Object { | ||
"build-storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:build", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/one/.storybook", | ||
}, | ||
"outputPath": "dist/storybook/ui/one", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
"outputs": Array [ | ||
"{options.outputPath}", | ||
], | ||
}, | ||
"storybook": Object { | ||
"executor": "@nrwl/storybook:storybook", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/one/.storybook", | ||
}, | ||
"port": 4400, | ||
"projectBuildConfig": "ui-one:build-storybook", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"ui-three": Object { | ||
"projectType": "library", | ||
"root": "libs/ui/three", | ||
"sourceRoot": "libs/ui/three/src", | ||
"targets": Object { | ||
"build-storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:build", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/three/.storybook", | ||
}, | ||
"outputPath": "dist/storybook/ui/three", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
"outputs": Array [ | ||
"{options.outputPath}", | ||
], | ||
}, | ||
"storybook": Object { | ||
"executor": "@nrwl/storybook:storybook", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/three/.storybook", | ||
}, | ||
"port": 4400, | ||
"projectBuildConfig": "ui-three:build-storybook", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"ui-two": Object { | ||
"projectType": "library", | ||
"root": "libs/ui/two", | ||
"sourceRoot": "libs/ui/two/src", | ||
"targets": Object { | ||
"build-storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:build", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/two/.storybook", | ||
}, | ||
"outputPath": "dist/storybook/ui/two", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
"outputs": Array [ | ||
"{options.outputPath}", | ||
], | ||
}, | ||
"storybook": Object { | ||
"executor": "@nrwl/storybook:storybook", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/two/.storybook", | ||
}, | ||
"port": 4400, | ||
"projectBuildConfig": "ui-two:build-storybook", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"version": 1, | ||
} | ||
`; | ||
|
||
exports[`Set the projectBuildConfig option in the Storybook configuration for Angular projects for non-angular projects should not change their Storybook configuration 1`] = ` | ||
Object { | ||
"projects": Object { | ||
"main-app": Object { | ||
"prefix": "katst", | ||
"projectType": "application", | ||
"root": "apps/main-app", | ||
"sourceRoot": "apps/main-app/src", | ||
"targets": Object { | ||
"storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:storybook", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "apps/main-app/.storybook", | ||
}, | ||
"port": 4400, | ||
"uiFramework": "@storybook/react", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"ui-one": Object { | ||
"projectType": "library", | ||
"root": "libs/ui/one", | ||
"sourceRoot": "libs/ui/one/src", | ||
"targets": Object { | ||
"build-storybook": Object { | ||
"configurations": Object { | ||
"ci": Object { | ||
"quiet": true, | ||
}, | ||
}, | ||
"executor": "@nrwl/storybook:build", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/one/.storybook", | ||
}, | ||
"outputPath": "dist/storybook/ui/one", | ||
"uiFramework": "@storybook/angular", | ||
}, | ||
"outputs": Array [ | ||
"{options.outputPath}", | ||
], | ||
}, | ||
"storybook": Object { | ||
"executor": "@nrwl/storybook:storybook", | ||
"options": Object { | ||
"config": Object { | ||
"configFolder": "libs/ui/one/.storybook", | ||
}, | ||
"port": 4400, | ||
"uiFramework": "@storybook/react", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"version": undefined, | ||
} | ||
`; |
Oops, something went wrong.