Add sb extract to enable Storybook composition (#12808)

* Add sb extract to enable Storybook composition

Ref: hashicorp/cloud-ui#1457 and https://github.com/hashicorp/design-system-website/blob/main/taskbox/.storybook/main.js

* Add metadata to enable SB extract

* Change dir location

* Change location of stories

* Move cp stories.json to build:storybook step
This commit is contained in:
Amy Lam 2021-11-18 07:19:46 -08:00 committed by GitHub
parent c933664eeb
commit e43f2bb80c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1870 additions and 30 deletions

5
ui/metadata.json Normal file
View File

@ -0,0 +1,5 @@
{
"versions": {
"main": "https://vault-storybook.vercel.app/"
}
}

View File

@ -9,7 +9,7 @@
"test": "tests"
},
"scripts": {
"build": "ember build --environment=production",
"build": "ember build --environment=production && cp metadata.json ../http/web_ui/metadata.json",
"build:dev": "ember build",
"lint:hbs": "ember-template-lint app/**/* lib/**/*",
"lint:js": "eslint .",
@ -23,7 +23,7 @@
"test:browserstack": "export CI=true; node scripts/start-vault.js --browserstack",
"test:quick": "node scripts/start-vault.js",
"test:quick-oss": "yarn test:quick -f='!enterprise'",
"build:storybook": "build-storybook -s ../http/web_ui",
"build:storybook": "build-storybook -s ../http/web_ui && sb extract && cp storybook-static/stories.json ../http/web_ui/stories.json",
"storybook": "start-storybook -p 6006 -s ../http/web_ui",
"deploy:storybook": "yarn build && yarn build:storybook",
"gen-story-md": "node scripts/gen-story-md.js",
@ -49,6 +49,7 @@
"@glimmer/tracking": "^1.0.2",
"@hashicorp/structure-icons": "^1.3.0",
"@icholy/duration": "^5.1.0",
"@storybook/cli": "^6.3.10",
"@storybook/ember-cli-storybook": "^0.4.0",
"autosize": "^4.0.0",
"babel-eslint": "^10.1.0",

File diff suppressed because it is too large Load Diff