mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
- Restore doc folder
This commit is contained in:
parent
63a6664a06
commit
b0984b0cbb
@ -1,6 +1,6 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
stories: ['../packages/**/*.stories.[tj]s'],
|
||||
stories: ['../packages/**/doc/*.stories.[tj]s'],
|
||||
presets: [path.resolve(__dirname, './custom-presets')],
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { addDecorator } from "@storybook/html";
|
||||
import { createApp } from "vue";
|
||||
import "../src/style/element-ui@2.13.2.css";
|
||||
import { addDecorator } from '@storybook/html';
|
||||
import { createApp } from 'vue';
|
||||
import '../src/style/element-ui@2.13.2.css';
|
||||
/**
|
||||
* Wraps a story into a Vue Element
|
||||
* @param {JSX.Element} template - Story templates
|
||||
@ -26,8 +26,8 @@ function CustomDecorator(content) {
|
||||
const { template, installer } = content();
|
||||
const app = createApp(Wrapper(template));
|
||||
installer(app);
|
||||
const entry = document.createElement("div");
|
||||
entry.className = "element-plus-previewer";
|
||||
const entry = document.createElement('div');
|
||||
entry.className = 'element-plus-previewer';
|
||||
app.mount(entry);
|
||||
return entry;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ElButton from './index';
|
||||
import ElButton from '../index';
|
||||
|
||||
export default {
|
||||
title: 'Button',
|
@ -27,6 +27,7 @@ NAME=$NORMALIZED_NAME
|
||||
|
||||
mkdir -p "$DIRNAME"
|
||||
mkdir -p "$DIRNAME/src"
|
||||
mkdir -p "$DIRNAME/doc"
|
||||
|
||||
cat <<EOF >"$DIRNAME/index.ts"
|
||||
import { App } from 'vue'
|
||||
@ -54,8 +55,8 @@ export default {
|
||||
|
||||
EOF
|
||||
|
||||
cat <<EOF >"$DIRNAME/index.stories.js"
|
||||
import El${NAME} from './index'
|
||||
cat <<EOF >"$DIRNAME/doc/index.stories.js"
|
||||
import El${NAME} from '../index'
|
||||
|
||||
export default {
|
||||
title: "${NAME}"
|
||||
|
Loading…
Reference in New Issue
Block a user