This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Storybook setup #2
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
643f3a7
add packages and config for storybook
meirish 0f26601
add story blueprint and test
meirish 3aeb788
update storybook so we can use addon docs auto-generation
meirish c7abc9f
use new more succinct main.js config for storybook - see https://gith…
meirish a4a8735
add generated preview-head to gitignore
meirish 28ea481
add top-level storybook:build yarn script
meirish 62a33af
add storybook output dir to gitignore
meirish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# compiled output | ||
/dist/ | ||
/tmp/ | ||
/.storybook/preview-head.html | ||
|
||
# dependencies | ||
/bower_components/ | ||
|
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,14 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
shippedProposals: true, | ||
useBuiltIns: 'usage', | ||
corejs: '3', | ||
targets: ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'], | ||
}, | ||
], | ||
], | ||
}; | ||
|
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,6 @@ | ||
module.exports = { | ||
addons: [ | ||
'@storybook/addon-docs', | ||
], | ||
stories: ['../stories/**/*.stories.(js|mdx)'], | ||
}; |
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,4 @@ | ||
import { setJSONDoc } from '@storybook/addon-docs/ember'; | ||
import json from '../dist/storybook-docgen/index.json'; | ||
|
||
setJSONDoc(json); |
14 changes: 14 additions & 0 deletions
14
packages/structure-core/blueprints/st-component/files/stories/__name__.stories.js
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,14 @@ | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
export default { | ||
title: 'Structure | <%= angleBracketInvocation %>', | ||
component: '<%= classifiedModuleName %>', | ||
}; | ||
|
||
// add stories by adding more exported functions | ||
export let <%= classifiedModuleName %> = () => ({ | ||
template: hbs`<<%= angleBracketInvocation %> />`, | ||
context: { | ||
// add items to the component rendering context here | ||
} | ||
}); |
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
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
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
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,6 @@ | ||
import { Meta } from '@storybook/addon-docs/blocks'; | ||
|
||
<Meta title="Welcome" /> | ||
|
||
# HashiCorp Structure | ||
[Code home](https://github.com/hashicorp/structure) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should do a build w/o the canvas tab - I think that's what we want but if not we can change it later