Fix Storybook server and update to latest version
- Fix build for Storybook - Update Storybook and dependencies to latest version - Update Storybook files from React template - Add task to CI to verify Storybook build
This commit is contained in:
parent
1b90900a52
commit
2bc533b9da
6 changed files with 1855 additions and 5455 deletions
3
.github/workflows/node.js.yml
vendored
3
.github/workflows/node.js.yml
vendored
|
@ -26,9 +26,10 @@ jobs:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- run: yarn install
|
- run: yarn install --frozen-lockfile
|
||||||
- run: yarn format-check
|
- run: yarn format-check
|
||||||
- run: yarn check-types
|
- run: yarn check-types
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
|
- run: yarn build-storybook
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- run: yarn test
|
- run: yarn test
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -90,8 +90,7 @@ lib/
|
||||||
# public
|
# public
|
||||||
|
|
||||||
# Storybook build outputs
|
# Storybook build outputs
|
||||||
.out
|
storybook-static/
|
||||||
.storybook-out
|
|
||||||
|
|
||||||
# vuepress build output
|
# vuepress build output
|
||||||
.vuepress/dist
|
.vuepress/dist
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"stories": [
|
stories: [
|
||||||
"../src/**/*.stories.mdx",
|
"../src/**/*.stories.mdx",
|
||||||
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
||||||
],
|
],
|
||||||
"addons": [
|
addons: [
|
||||||
"@storybook/addon-links",
|
"@storybook/addon-links",
|
||||||
"@storybook/addon-essentials",
|
"@storybook/addon-essentials",
|
||||||
"@storybook/preset-create-react-app"
|
{
|
||||||
|
name: "@storybook/addon-postcss",
|
||||||
|
options: {
|
||||||
|
// Explicitly enable PostCSS 8+ (see: https://storybook.js.org/addons/@storybook/addon-postcss)
|
||||||
|
postcssLoaderOptions: {
|
||||||
|
implementation: require("postcss"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,4 +1,9 @@
|
||||||
|
|
||||||
export const parameters = {
|
export const parameters = {
|
||||||
actions: { argTypesRegex: "^on[A-Z].*" },
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
||||||
|
controls: {
|
||||||
|
matchers: {
|
||||||
|
color: /(background|color)$/i,
|
||||||
|
date: /Date$/,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
20
package.json
20
package.json
|
@ -14,17 +14,17 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "snowpack build",
|
"build": "snowpack build",
|
||||||
"build-storybook": "build-storybook -s public",
|
|
||||||
"check-types": "tsc -p ./",
|
"check-types": "tsc -p ./",
|
||||||
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
|
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||||
"format-check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
|
"format-check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||||
"lint": "eslint ./src/**/*.ts*",
|
"lint": "eslint ./src/**/*.ts*",
|
||||||
"postinstall": "grunt",
|
"postinstall": "grunt",
|
||||||
"start": "snowpack dev",
|
"start": "snowpack dev",
|
||||||
"storybook": "start-storybook -p 6006 -s public",
|
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"start:cypress": "cypress open",
|
"start:cypress": "cypress open",
|
||||||
"start:cypress-tests": "cypress run"
|
"start:cypress-tests": "cypress run",
|
||||||
|
"storybook": "start-storybook -p 6006",
|
||||||
|
"build-storybook": "build-storybook"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@patternfly/patternfly": "^4.115.2",
|
"@patternfly/patternfly": "^4.115.2",
|
||||||
|
@ -51,15 +51,11 @@
|
||||||
"@snowpack/app-scripts-react": "^1.12.6",
|
"@snowpack/app-scripts-react": "^1.12.6",
|
||||||
"@snowpack/plugin-postcss": "1.4.3",
|
"@snowpack/plugin-postcss": "1.4.3",
|
||||||
"@snowpack/plugin-webpack": "3.0.0",
|
"@snowpack/plugin-webpack": "3.0.0",
|
||||||
"@storybook/addon-actions": "^6.2.9",
|
"@storybook/addon-actions": "^6.3.2",
|
||||||
"@storybook/addon-essentials": "^6.1.7",
|
"@storybook/addon-essentials": "^6.3.2",
|
||||||
"@storybook/addon-info": "^5.3.21",
|
"@storybook/addon-links": "^6.3.2",
|
||||||
"@storybook/addon-links": "^6.2.9",
|
"@storybook/addon-postcss": "^2.0.0",
|
||||||
"@storybook/addons": "^6.2.9",
|
"@storybook/react": "^6.3.2",
|
||||||
"@storybook/node-logger": "^6.1.7",
|
|
||||||
"@storybook/preset-create-react-app": "^3.1.7",
|
|
||||||
"@storybook/preset-typescript": "^3.0.0",
|
|
||||||
"@storybook/react": "^6.2.9",
|
|
||||||
"@testing-library/jest-dom": "^5.14.1",
|
"@testing-library/jest-dom": "^5.14.1",
|
||||||
"@testing-library/react": "^12.0.0",
|
"@testing-library/react": "^12.0.0",
|
||||||
"@types/dot": "^1.1.4",
|
"@types/dot": "^1.1.4",
|
||||||
|
|
Loading…
Reference in a new issue