-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
153 additions
and
12 deletions.
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 |
---|---|---|
|
@@ -107,6 +107,7 @@ jobs: | |
- app | ||
- lib | ||
- renderers | ||
- presets | ||
chromatic: | ||
executor: sb_node_14_browsers | ||
parallelism: 4 | ||
|
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 |
---|---|---|
@@ -1,13 +1,6 @@ | ||
import type { Configuration } from 'webpack'; | ||
import type { StorybookConfig } from '@storybook/core-common'; | ||
|
||
export function webpack(config: Configuration) { | ||
config.module.rules.push({ | ||
test: /\.html$/, | ||
use: require.resolve('html-loader') as string, | ||
}); | ||
|
||
return config; | ||
} | ||
|
||
export const addons: StorybookConfig['addons'] = ['@storybook/renderer-html']; | ||
export const addons: StorybookConfig['addons'] = [ | ||
'@storybook/preset-html-webpack', | ||
'@storybook/renderer-html', | ||
]; |
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,25 @@ | ||
# Storybook for HTML (Webpack) | ||
|
||
--- | ||
|
||
Storybook for HTML is a UI development environment for your plain HTML snippets. | ||
With it, you can visualize different states of your UI components and develop them interactively. | ||
|
||
 | ||
|
||
Storybook runs outside of your app. | ||
So you can develop UI components in isolation without worrying about app specific dependencies and requirements. | ||
|
||
## Getting Started | ||
|
||
```sh | ||
cd my-app | ||
npx sb init -t html | ||
``` | ||
|
||
For more information visit: [storybook.js.org](https://storybook.js.org) | ||
|
||
--- | ||
|
||
Storybook also comes with a lot of [addons](https://storybook.js.org/docs/html/configure/storybook-addons) and a great API to customize as you wish. | ||
You can also build a [static version](https://storybook.js.org/docs/html/workflows/publish-storybook) of your storybook and deploy it anywhere you want. |
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,66 @@ | ||
{ | ||
"name": "@storybook/preset-html-webpack", | ||
"version": "6.5.0-alpha.64", | ||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", | ||
"keywords": [ | ||
"storybook" | ||
], | ||
"homepage": "https://github.com/storybookjs/storybook/tree/main/presets/html-webpack", | ||
"bugs": { | ||
"url": "https://github.com/storybookjs/storybook/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/storybookjs/storybook.git", | ||
"directory": "presets/html-webpack" | ||
}, | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/storybook" | ||
}, | ||
"license": "MIT", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/ts3.9/index.d.ts", | ||
"typesVersions": { | ||
"<3.8": { | ||
"dist/ts3.9/*": [ | ||
"dist/ts3.4/*" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"dist/**/*", | ||
"README.md", | ||
"*.js", | ||
"*.d.ts" | ||
], | ||
"scripts": { | ||
"prepare": "node ../../scripts/prepare.js" | ||
}, | ||
"dependencies": { | ||
"@storybook/core-common": "6.5.0-alpha.64", | ||
"@types/node": "^14.14.20 || ^16.0.0", | ||
"@types/webpack-env": "^1.16.0", | ||
"core-js": "^3.8.2", | ||
"html-loader": "^1.3.2", | ||
"react": "16.14.0", | ||
"react-dom": "16.14.0", | ||
"regenerator-runtime": "^0.13.7", | ||
"webpack": ">=4.0.0 <6.0.0" | ||
}, | ||
"devDependencies": { | ||
"webpack": "4" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "*" | ||
}, | ||
"engines": { | ||
"node": ">=10.13.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "416f87dc715cae299c7b4f37f1c9db7f686d4d21", | ||
"sbmodern": "dist/modern/client/index.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 @@ | ||
module.exports = require('./dist/cjs/preset'); |
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,10 @@ | ||
import type { StorybookConfig } from '@storybook/core-common'; | ||
|
||
export const webpack: StorybookConfig['webpack'] = (config) => { | ||
config.module.rules.push({ | ||
test: /\.html$/, | ||
use: require.resolve('html-loader') as string, | ||
}); | ||
|
||
return config; | ||
}; |
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,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"types": ["webpack-env", "node"] | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["src/**/*.test.*", "src/__tests__/**/*"] | ||
} |
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 |
---|---|---|
|
@@ -8061,6 +8061,7 @@ __metadata: | |
"@storybook/core-common": 6.5.0-alpha.64 | ||
"@storybook/core-server": 6.5.0-alpha.64 | ||
"@storybook/docs-tools": 6.5.0-alpha.64 | ||
"@storybook/preset-html-webpack": 6.5.0-alpha.64 | ||
"@storybook/renderer-html": 6.5.0-alpha.64 | ||
"@types/node": ^14.14.20 || ^16.0.0 | ||
"@types/webpack-env": ^1.16.0 | ||
|
@@ -8356,6 +8357,24 @@ __metadata: | |
languageName: node | ||
linkType: hard | ||
|
||
"@storybook/[email protected], @storybook/preset-html-webpack@workspace:*, @storybook/preset-html-webpack@workspace:presets/html-webpack": | ||
version: 0.0.0-use.local | ||
resolution: "@storybook/preset-html-webpack@workspace:presets/html-webpack" | ||
dependencies: | ||
"@storybook/core-common": 6.5.0-alpha.64 | ||
"@types/node": ^14.14.20 || ^16.0.0 | ||
"@types/webpack-env": ^1.16.0 | ||
core-js: ^3.8.2 | ||
html-loader: ^1.3.2 | ||
react: 16.14.0 | ||
react-dom: 16.14.0 | ||
regenerator-runtime: ^0.13.7 | ||
webpack: 4 | ||
peerDependencies: | ||
"@babel/core": "*" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"@storybook/preset-scss@npm:^1.0.3": | ||
version: 1.0.3 | ||
resolution: "@storybook/preset-scss@npm:1.0.3" | ||
|
@@ -8730,6 +8749,7 @@ __metadata: | |
"@storybook/node-logger": "workspace:*" | ||
"@storybook/postinstall": "workspace:*" | ||
"@storybook/preact": "workspace:*" | ||
"@storybook/preset-html-webpack": "workspace:*" | ||
"@storybook/preview-web": "workspace:*" | ||
"@storybook/react": "workspace:*" | ||
"@storybook/renderer-html": "workspace:*" | ||
|