refactor: document structure

This commit is contained in:
07akioni 2019-09-23 15:04:57 +08:00
parent 935eceea97
commit 72eb24c740
19 changed files with 22 additions and 22 deletions

View File

@ -37,14 +37,14 @@ const webpackConfig = {
rules: [
{
test: /index\.md$/,
loader: ['vue-loader', path.resolve(__dirname, '../marked/NaiveUIDocLoader.js')]
loader: ['vue-loader', path.resolve(__dirname, '../demo/loaders/NaiveUIDocLoader.js')]
},
{
test: {
test: /\.md$/,
exclude: /index\.md$/
},
loader: ['vue-loader', path.resolve(__dirname, '../marked/NaiveUIMdLoader.js')]
loader: ['vue-loader', path.resolve(__dirname, '../demo/loaders/NaiveUIDemoLoader.js')]
},
{
test: /\.demo\.vue$/,

View File

@ -32,14 +32,14 @@ const webpackConfig = {
rules: [
{
test: /index\.md$/,
loader: ['vue-loader', path.resolve(__dirname, '../marked/NaiveUIDocLoader.js')]
loader: ['vue-loader', path.resolve(__dirname, '../demo/loaders/NaiveUIDocLoader.js')]
},
{
test: {
test: /\.md$/,
exclude: /index\.md$/
},
loader: ['vue-loader', path.resolve(__dirname, '../marked/NaiveUIMdLoader.js')]
loader: ['vue-loader', path.resolve(__dirname, '../demo/loaders/NaiveUIDemoLoader.js')]
},
{
test: /\.demo\.vue$/,

View File

@ -32,14 +32,14 @@ const webpackConfig = {
rules: [
{
test: /index\.md$/,
loader: ['vue-loader', path.resolve(__dirname, '../marked/NaiveUIDocLoader.js')]
loader: ['vue-loader', path.resolve(__dirname, '../demo/loaders/NaiveUIDocLoader.js')]
},
{
test: {
test: /\.md$/,
exclude: /index\.md$/
},
loader: ['vue-loader', path.resolve(__dirname, '../marked/NaiveUIMdLoader.js')]
loader: ['vue-loader', path.resolve(__dirname, '../demo/loaders/NaiveUIDemoLoader.js')]
},
{
test: /\.demo\.vue$/,

View File

@ -2,9 +2,9 @@ import Vue from 'vue/dist/vue'
import VueRouter from 'vue-router'
import '../styles/index.scss'
import 'codemirror/lib/codemirror.css'
import './atom-one-dark-reasonable.scss'
import './atom-one-light.scss'
import './markdown.scss'
import './styles/atom-one-dark-reasonable.scss'
import './styles/atom-one-light.scss'
import './styles/markdown.scss'
import NaiveUI from '../index'
import SourceBlock from './SourceBlock'
import VueI18n from 'vue-i18n'
@ -63,11 +63,11 @@ import sliderDemo from './components/sliderDemo'
import treeDemo from './components/treeDemo'
import demo from './demo'
import DemoSection from './DemoSection'
import ComponentDemos from './ComponentDemos'
import ComponentDocumentation from './ComponentDocumentation'
import DocumentationWrapper from './DocumentationWrapper'
import './CodeBox.scss'
import ComponentDemo from './utils/ComponentDemo'
import ComponentDemos from './utils/ComponentDemos'
import ComponentDocumentation from './utils/ComponentDocumentation'
import DocumentationWrapper from './utils/DocumentationWrapper'
import './styles/ComponentDemo.scss'
import popoverDebug from './debugComponents/popoverDebug'
import routerDebug from './debugComponents/routerDebug'
@ -87,7 +87,7 @@ const i18n = new VueI18n({
})
Vue.component(SourceBlock.name, SourceBlock)
Vue.component('DemoSection', DemoSection)
Vue.component('ComponentDemo', ComponentDemo)
Vue.component('ComponentDemos', ComponentDemos)
Vue.component('DocumentationWrapper', DocumentationWrapper)
Vue.component('ComponentDocumentation', ComponentDocumentation)

View File

@ -1,5 +1,5 @@
<template>
<demo-section>
<component-demo>
<template v-slot:title>
<!--TITLE_SLOT-->
</template>
@ -12,7 +12,7 @@
<template v-slot:code>
<!--CODE_SLOT-->
</template>
</demo-section>
</component-demo>
</template>
<script>

View File

@ -37,7 +37,7 @@ marked.setOptions({
renderer
})
const demoBlock = fs.readFileSync(path.resolve(__dirname, 'DemoBlock.vue')).toString()
const demoBlock = fs.readFileSync(path.resolve(__dirname, 'ComponentDemoTemplate.vue')).toString()
function getPartsOfDemo (tokens) {
let template = null

View File

@ -1,5 +1,5 @@
@import '../styles/mixins/config.scss';
@import '../styles/mixins/mixins.scss';
@import '../../styles/mixins/config.scss';
@import '../../styles/mixins/mixins.scss';
@include themes-mixin {
@include b(code-box) {

View File

@ -43,8 +43,8 @@
</template>
<script>
import withapp from '../packages/mixins/withapp'
import themeable from '../packages/mixins/themeable'
import withapp from '../../packages/mixins/withapp'
import themeable from '../../packages/mixins/themeable'
import 'highlight.js/styles/atom-one-dark-reasonable.css'
import 'highlight.js/styles/atom-one-light.css'