-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Chore: (Docs) Updates to the Angular documentation #17419
Conversation
Nx Cloud ReportCI is running for commit f979a5c. 📂 Click to track the progress, see the status, the terminal output, and the build insights. Sent with 💌 from NxCloud. |
@juri-sinitson thanks for the time and effort you've put into this pull request. We appreciate your willingness to help improve our documentation. I was looking at this, and there's already an open pull request to address this situation (#17387). There are just a couple of items that need follow-up in that pull request and it will be merged. One thing that we could do to help complement the documentation is the following, once the pr I mentioned is merged you could make a follow-up and add the NX instructions to provide a bit more clarity? Let me know what you think. Would like to hear your thoughts on it. Have a great weekend! Stay safe |
I think it's a good idea. Until that I'll wait until the PR you mentioned above is merged. |
docs/configure/styling-and-css.md
Outdated
```json | ||
"build-storybook": { | ||
"options": { | ||
"styles": ["apps/my-default-app/src/styles.scss"] |
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.
Just some information. I don't know if it is interesting. I don't even know if it's necessary to add it here. but FYI
If the user uses the browserTarget
option without the styles
option then it will use the styles of the target.
If both are given the style defined here will be used.
In some cases we will want to add a main scss file only for Storybook. For example if we have one Storybook for several projects and applications inside angular workspace
Ex :
"styles": [".storybook/styles.scss"]
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.
If the user uses the browserTarget option without the styles option then it will use the styles of the target.
If both are given the style defined here will be used.
This does not seem to work with Nx+Angular both version 13.x. Have just tired with a production project. It looks like you really need to tell storybook directly which styles to use in this case.
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.
Thank you for this work. I know that I'm not very available and active lately, but don't hesitate to ask me questions if something seems unclear
I've just made an new PR #17520 with instructions for NX. |
@juri-sinitson appreciate the follow-up and willingness to make the pull request to address the issue. I'll check it today (Wednesday) and let you know of any additional feedback. Thank you very much 🙏 ! |
Add documentation for Nx 13 with Angular 13 #17419
Add documentation for Nx 13 with Angular 13 #17419
Issue:
What I did
Importing styles in
.storybook/preview.js
didn't work for me.Tried also with and without the webpack mofications proposed above.
This instruction worked: #16950 (comment)
How to test
demo
like thisnpx nx g lib demo
test
in the librarydemo
like thisnpx nx g m --name test --project demo
test
in the librarydemo
like this:npx nx g c --name test --project demo
demo
like this:npx nx g @nrwl/angular:storybook-configuration demo
demo
like this:npx nx g @nrwl/angular:stories demo
styles.scss
somewhere in the projectnpx nx run demo:storybook