-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular: Add angular builder to start + build storybook #15061
Conversation
Nx Cloud ReportCI ran the following commands for commit ccc4ef1. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far 👍
|
||
beforeEach(async () => { | ||
const registry = new schema.CoreSchemaRegistry(); | ||
registry.addPostTransform(schema.transforms.addUndefinedDefaults); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? (15 and 16) I do lots of stuff with schematics but never have I seen this in tests, I'm curious 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this add all default props set in schema.json to test it
I was inspired by https://angular.io/guide/cli-builder#testing-a-builder ^^
7a79f38
to
3070788
Compare
The builder allows to add a "architect" in angular.json to start storybook config ex : ``` "storybook": { "builder": "@storybook/angular:start-storybook", "options": { "browserTarget": "angular-cli:build", "port": 4400 } ``` cmd : `ng run angular-cli:storybook` With this solution it is possible to have several angular projects using different assets and style
The builder allows to add a "architect" in angular.json to build storybook config ex : ``` "build-storybook": { "builder": "@storybook/angular:build-storybook", "options": { "browserTarget": "angular-cli:build" } } ``` cmd : `ng run angular-cli:build-storybook` With this solution it is possible to have several angular projects using different assets and style
3070788
to
d14690c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great
Great PR - Should be incorporated into nx.dev workflow asap |
If I have the time I'll go tease them with a PR 😁 |
Issue: #3995
Other :
#12058
#12232
To bring Storybook closer to angular, add 2 builders, one to start the application and one for the build
Both builders have a required option
browserTarget
which allows storybook to use the configs usually defined for the browser builder (@angular-devkit/build-angular:browser
) of Angular. This way "reflects" the one already used byangular-cli
for the builderserve
,extract-i18n
.What I did
The builder allows to add a "architect" in angular.json to start or build storybook
config ex :
cmd :
ng run angular-cli:storybook
orng run angular-cli:build-storybook
With this solution it is possible to have several angular projects using different assets and style
How to test
Yes
na
maybe