mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Minimum changes to get storybook working (#7884)
* Minimum changes to get storybook working Undo path changes * Add build:storybook scripts to package.json * Add storybook deployer * Add storybook:deploy to package.json * Update circle ci config * Update yarn.lock * Remove addon-info * Update yarn.lock file to reflect removing of addon-info Co-authored-by: Dan J Miller <danjm.com@gmail.com>
This commit is contained in:
parent
38a71a6067
commit
245952f236
@ -83,6 +83,12 @@ workflows:
|
||||
- prep-build
|
||||
# - prep-docs
|
||||
- all-tests-pass
|
||||
- job-publish-storybook:
|
||||
filters:
|
||||
branches:
|
||||
only: develop
|
||||
requires:
|
||||
- prep-deps
|
||||
- coveralls-upload:
|
||||
requires:
|
||||
- test-unit
|
||||
@ -349,6 +355,16 @@ jobs:
|
||||
# git config --global user.name "metamaskbot" &&
|
||||
# git config --global user.email "admin@metamask.io" &&
|
||||
# yarn publish-docs
|
||||
job-publish-storybook:
|
||||
docker:
|
||||
- image: circleci/node:10.17-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: storybook:deploy
|
||||
command: yarn storybook:deploy
|
||||
|
||||
test-unit:
|
||||
docker:
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from 'react'
|
||||
import { addDecorator } from '@storybook/react'
|
||||
import { withInfo } from '@storybook/addon-info'
|
||||
import { withKnobs } from '@storybook/addon-knobs/react'
|
||||
|
||||
const styles = {
|
||||
@ -16,6 +15,5 @@ const CenterDecorator = story => (
|
||||
</div>
|
||||
)
|
||||
|
||||
addDecorator((story, context) => withInfo()(story)(context))
|
||||
addDecorator(withKnobs)
|
||||
addDecorator(CenterDecorator)
|
||||
|
11
package.json
11
package.json
@ -53,6 +53,8 @@
|
||||
"announce": "node development/announcer.js",
|
||||
"version:bump": "node development/run-version-bump.js",
|
||||
"storybook": "start-storybook -p 6006 -c .storybook",
|
||||
"storybook:build": "build-storybook -c .storybook -o .out",
|
||||
"storybook:deploy": "storybook-to-ghpages",
|
||||
"update-changelog": "./development/auto-changelog.sh",
|
||||
"rollback": "./development/rollback.sh",
|
||||
"generate:migration": "./development/generate-migration.sh"
|
||||
@ -197,12 +199,13 @@
|
||||
"@metamask/forwarder": "^1.1.0",
|
||||
"@metamask/onboarding": "^0.2.0",
|
||||
"@sentry/cli": "^1.49.0",
|
||||
"@storybook/addon-actions": "^5.2.6",
|
||||
"@storybook/addon-info": "^5.1.1",
|
||||
"@storybook/addon-knobs": "^5.1.1",
|
||||
"@storybook/react": "^5.1.1",
|
||||
"@storybook/addon-actions": "^5.2.8",
|
||||
"@storybook/addon-knobs": "^5.2.8",
|
||||
"@storybook/react": "^5.2.8",
|
||||
"@storybook/storybook-deployer": "^2.8.1",
|
||||
"addons-linter": "1.14.0",
|
||||
"babel-eslint": "^10.0.2",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babelify": "^10.0.0",
|
||||
"brfs": "^1.6.1",
|
||||
"browserify": "^16.2.3",
|
||||
|
Loading…
Reference in New Issue
Block a user