Add support for html stories
This commit is contained in:
parent
7a11b88a92
commit
3aeae30957
6 changed files with 864 additions and 37 deletions
11
.storybook/html/main.js
Normal file
11
.storybook/html/main.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
// License: LGPL-3.0-or-later
|
||||||
|
module.exports = {
|
||||||
|
"stories": [
|
||||||
|
"../../app/javascript/**/*--html.stories.mdx",
|
||||||
|
"../../app/javascript/**/*--html.stories.@(js|jsx|ts|tsx)"
|
||||||
|
],
|
||||||
|
"addons": [
|
||||||
|
"@storybook/addon-links",
|
||||||
|
"@storybook/addon-essentials"
|
||||||
|
]
|
||||||
|
}
|
4
.storybook/html/preview.js
Normal file
4
.storybook/html/preview.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
// License: LGPL-3.0-or-later
|
||||||
|
export const parameters = {
|
||||||
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
||||||
|
}
|
4
bin/bulid-html-storybook
Executable file
4
bin/bulid-html-storybook
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
||||||
|
require('@storybook/html/dist/server/build');
|
3
bin/start-html-storybook
Executable file
3
bin/start-html-storybook
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
require('@storybook/html/dist/server');
|
|
@ -11,8 +11,10 @@
|
||||||
"test": "rake -v spec && yarn build && yarn jest",
|
"test": "rake -v spec && yarn build && yarn jest",
|
||||||
"jest": "jest",
|
"jest": "jest",
|
||||||
"eslint": "eslint . --ext .ts,.js,.es6,.tsx",
|
"eslint": "eslint . --ext .ts,.js,.es6,.tsx",
|
||||||
"storybook": "start-storybook -p 6006",
|
"storybook": "start-storybook -p 6006 -c .storybook/react",
|
||||||
"build-storybook": "build-storybook"
|
"build-storybook": "build-storybook -c .storybook/react",
|
||||||
|
"html-storybook": "bin/start-html-storybook -p 6007 -c .storybook/html",
|
||||||
|
"build-html-storybook": "bin/build-html-storybook -c .storybook/html"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.0.0",
|
"@babel/core": "^7.0.0",
|
||||||
|
@ -23,9 +25,11 @@
|
||||||
"@babel/preset-typescript": "^7.9.0",
|
"@babel/preset-typescript": "^7.9.0",
|
||||||
"@rails/webpacker": "^5.1.1",
|
"@rails/webpacker": "^5.1.1",
|
||||||
"@storybook/addon-actions": "^6.0.21",
|
"@storybook/addon-actions": "^6.0.21",
|
||||||
|
"@storybook/addon-essentials": "^6.0.21",
|
||||||
"@storybook/addon-knobs": "^6.0.21",
|
"@storybook/addon-knobs": "^6.0.21",
|
||||||
"@storybook/addon-links": "^6.0.21",
|
"@storybook/addon-links": "^6.0.21",
|
||||||
"@storybook/addons": "^6.0.21",
|
"@storybook/addons": "^6.0.21",
|
||||||
|
"@storybook/html": "^6.0.21",
|
||||||
"@storybook/react": "^6.0.21",
|
"@storybook/react": "^6.0.21",
|
||||||
"@testing-library/jest-dom": "^5.11.1",
|
"@testing-library/jest-dom": "^5.11.1",
|
||||||
"@testing-library/react": "^10.4.7",
|
"@testing-library/react": "^10.4.7",
|
||||||
|
@ -77,6 +81,7 @@
|
||||||
"object-hash": "^2.0.3",
|
"object-hash": "^2.0.3",
|
||||||
"phantomjs-prebuilt": "^2.1.16",
|
"phantomjs-prebuilt": "^2.1.16",
|
||||||
"rails-erb-loader": "^5.5.2",
|
"rails-erb-loader": "^5.5.2",
|
||||||
|
"react-is": "^16.13.1",
|
||||||
"react-test-renderer": "^16.13.1",
|
"react-test-renderer": "^16.13.1",
|
||||||
"resolve-url-loader": "^2.3.0",
|
"resolve-url-loader": "^2.3.0",
|
||||||
"sass-loader": "^7.0.1",
|
"sass-loader": "^7.0.1",
|
||||||
|
|
Loading…
Reference in a new issue