Skip to content
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

fix(storybook): generate SB website in _site intead of site #1660

Merged
merged 2 commits into from Nov 23, 2022

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Nov 23, 2022

Related issues

Linked to the following issue mentioned in #1626:

Error message when running npm run storybook-build and then npm run storybook

...
> boosted@5.2.1 docs-vnu
> node build/vnu-jar.js

"file:/Users/ju/Orange-Boosted-Bootstrap/_site/storybook/index.html":1.38-1.60: info warning: Self-closing tag syntax in text/html documents is widely discouraged; it's unnecessary and interacts badly with other HTML features (e.g., unquoted attribute values). If you're using a tool that injects self-closing tag syntax into all void elements, without any option to prevent it from doing so, then consider switching to a different tool.
"file:/Users/ju/Orange-Boosted-Bootstrap/_site/storybook/index.html":1.87-^C

Description

This error is generated by the HTML validator that scans our site directory. Since Storybook website is generated in site, the HTML validator is not very happy with the self-closing tags.

But in fact, there's no reason to generate Storybook website in site. After the release, we're going to copy _site and not site into gh-pages.

When running locally npm run storybook, Storybook website is not generated as HTML files.

So the only thing to change here is to keep it working with Netlify which needs to have site/storybook directory. I have created a special npm command to differenciate the normal build and the one reserved to Netlify.

Non-regression testing

  • npm run storybook works locally and doesn't generate _site/storybook nor site/storybook
  • running npm run storybook-build and then npm run storybook works without the error mentioned in the description
  • npm run storybook-build creates _site/storybook but nothing in site
  • npm run release creates _site/storybook but nothing in site

Types of change

  • Bug fix (non-breaking which fixes an issues)

Live previews

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • All new and existing tests passed

@netlify
Copy link

netlify bot commented Nov 23, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 3cd51fc
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/637e27063874b100089c2560
😎 Deploy Preview https://deploy-preview-1660--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sonarcloud
Copy link

sonarcloud bot commented Nov 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julien-deramond julien-deramond marked this pull request as ready for review November 23, 2022 14:05
@julien-deramond julien-deramond added this to In progress in v5.2.3 Nov 23, 2022
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great ! Couldn't spot any breaking change and will clear some stuff.

@julien-deramond julien-deramond merged commit 532e9d4 into main Nov 23, 2022
v5.2.3 automation moved this from In progress to Done Nov 23, 2022
@julien-deramond julien-deramond deleted the main-jd-fix-storybook-build branch November 23, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants