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

UI: Extract stories.json for Storybook composition #11274

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ui/.vercel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ mkdir -p ui-dist/ui
mv dist/* ui-dist/ui/

yarn build-storybook
yarn extract-storybook
cp storybook-static/stories.json ui-dist/ui/
mv storybook-static ui-dist/storybook/

2 changes: 2 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"lint:js": "eslint .",
"start": "./node_modules/ember-cli/bin/ember server",
"build-storybook": "STORYBOOK=true ember build && build-storybook -s dist",
"extract-storybook": "sb extract",
"storybook": "STORYBOOK=true start-storybook -p 6006 -s dist",
"test": "npm-run-all lint:* test:*",
"test:ember": "ember test"
Expand All @@ -39,6 +40,7 @@
"@glimmer/component": "^1.0.1",
"@glimmer/tracking": "^1.0.0",
"@hashicorp/structure-icons": "^1.3.0",
"@storybook/cli": "^6.3.10",
"@storybook/ember-cli-storybook": "https://github.com/DingoEatingFuzz/ember-cli-storybook#c207500",
"anser": "^1.4.8",
"babel-eslint": "^10.1.0",
Expand Down
5 changes: 5 additions & 0 deletions ui/public/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"versions": {
"main": "https://nomad-storybook-and-ui.vercel.app/storybook"
}
Copy link

Choose a reason for hiding this comment

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

i need to look into this comment https://github.com/hashicorp/cloud-ui/pull/1457#discussion_r724258881

i'm thinking it may not apply to nomad, cause the product is self-hosted, not cloud?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh snap, it definitely still applies. Everything in /public gets shrink-wrapped into the nomad binary via go-bindata-assetfs.

Copy link

Choose a reason for hiding this comment

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

to follow up here, i removed /public/metadata.json from cloud-ui, since we don't seem to need versions

i will see if i can use the storybook link from this build in design-system-website next

Copy link

Choose a reason for hiding this comment

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

totally works! thanks for your help with this @DingoEatingFuzz, much appreciated https://github.com/hashicorp/design-system-website/pull/13

}
Loading