mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
HTML renderer
This commit is contained in:
parent
eb05bfbb37
commit
3ad6be9431
@ -39,14 +39,10 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addons": "6.5.0-alpha.63",
|
||||
"@storybook/core-client": "6.5.0-alpha.63",
|
||||
"@storybook/core-common": "6.5.0-alpha.63",
|
||||
"@storybook/core-server": "6.5.0-alpha.63",
|
||||
"@storybook/csf": "0.0.2--canary.7c6c115.0",
|
||||
"@storybook/docs-tools": "6.5.0-alpha.63",
|
||||
"@storybook/preview-web": "6.5.0-alpha.63",
|
||||
"@storybook/store": "6.5.0-alpha.63",
|
||||
"@storybook/renderer-html": "6.5.0-alpha.63",
|
||||
"@types/node": "^14.14.20 || ^16.0.0",
|
||||
"@types/webpack-env": "^1.16.0",
|
||||
"core-js": "^3.8.2",
|
||||
@ -54,9 +50,7 @@
|
||||
"html-loader": "^1.3.2",
|
||||
"react": "16.14.0",
|
||||
"react-dom": "16.14.0",
|
||||
"read-pkg-up": "^7.0.1",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"ts-dedent": "^2.0.0",
|
||||
"webpack": ">=4.0.0 <6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,16 +1 @@
|
||||
export {
|
||||
storiesOf,
|
||||
setAddon,
|
||||
addDecorator,
|
||||
addParameters,
|
||||
configure,
|
||||
getStorybook,
|
||||
forceReRender,
|
||||
raw,
|
||||
} from './preview';
|
||||
|
||||
export * from './preview/types-6-0';
|
||||
|
||||
if (module && module.hot && module.hot.decline) {
|
||||
module.hot.decline();
|
||||
}
|
||||
export * from '@storybook/renderer-html';
|
||||
|
@ -1,8 +1,7 @@
|
||||
import type { StorybookConfig } from '@storybook/core-common';
|
||||
import { findDistEsm } from '@storybook/core-common';
|
||||
import { hasDocsOrControls } from '@storybook/docs-tools';
|
||||
|
||||
export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => {
|
||||
if (!hasDocsOrControls(options)) return entry;
|
||||
return [...entry, findDistEsm(__dirname, 'client/docs/config')];
|
||||
return [...entry, require.resolve('@storybook/renderer-html/dist/esm/docs/config')];
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { findDistEsm } from '@storybook/core-common';
|
||||
import type { Configuration } from 'webpack';
|
||||
import type { StorybookConfig } from '@storybook/core-common';
|
||||
|
||||
@ -12,5 +11,5 @@ export function webpack(config: Configuration) {
|
||||
}
|
||||
|
||||
export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => {
|
||||
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
||||
return [...entry, require.resolve('@storybook/renderer-html/dist/esm/preview/config')];
|
||||
};
|
||||
|
1
renderers/html/README.md
Normal file
1
renderers/html/README.md
Normal file
@ -0,0 +1 @@
|
||||
# Storybook HTML Renderer
|
70
renderers/html/package.json
Normal file
70
renderers/html/package.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "@storybook/renderer-html",
|
||||
"version": "6.5.0-alpha.63",
|
||||
"description": "Storybook HTML renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
],
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/main/renderers/html",
|
||||
"bugs": {
|
||||
"url": "https://github.com/storybookjs/storybook/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/storybookjs/storybook.git",
|
||||
"directory": "renderers/html"
|
||||
},
|
||||
"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/addons": "6.5.0-alpha.63",
|
||||
"@storybook/core-client": "6.5.0-alpha.63",
|
||||
"@storybook/csf": "0.0.2--canary.7c6c115.0",
|
||||
"@storybook/docs-tools": "6.5.0-alpha.63",
|
||||
"@storybook/preview-web": "6.5.0-alpha.63",
|
||||
"@storybook/store": "6.5.0-alpha.63",
|
||||
"core-js": "^3.8.2",
|
||||
"global": "^4.4.0",
|
||||
"react": "16.14.0",
|
||||
"react-dom": "16.14.0",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"ts-dedent": "^2.0.0",
|
||||
"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/index.js"
|
||||
}
|
16
renderers/html/src/index.ts
Normal file
16
renderers/html/src/index.ts
Normal file
@ -0,0 +1,16 @@
|
||||
export {
|
||||
storiesOf,
|
||||
setAddon,
|
||||
addDecorator,
|
||||
addParameters,
|
||||
configure,
|
||||
getStorybook,
|
||||
forceReRender,
|
||||
raw,
|
||||
} from './preview';
|
||||
|
||||
export * from './preview/types-6-0';
|
||||
|
||||
if (module && module.hot && module.hot.decline) {
|
||||
module.hot.decline();
|
||||
}
|
4
renderers/html/src/typings.d.ts
vendored
Normal file
4
renderers/html/src/typings.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module 'global';
|
||||
|
||||
// will be provided by the webpack define plugin
|
||||
declare var NODE_ENV: string | undefined;
|
9
renderers/html/tsconfig.json
Normal file
9
renderers/html/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"types": []
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["src/**/*.test.*", "src/__tests__/**/*"]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user