site: add site build
parent
9388245462
commit
a4823664c6
|
@ -8,8 +8,8 @@
|
||||||
</demo-sort>
|
</demo-sort>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import IconDisplay from '../../../theme/template/IconDisplay';
|
import IconDisplay from '../../../site/src/theme/template/IconDisplay';
|
||||||
import Basic from './basic.vue';
|
import Basic from './basic.vue';
|
||||||
import Custom from './custom.vue';
|
import Custom from './custom.vue';
|
||||||
import Iconfont from './iconfont.vue';
|
import Iconfont from './iconfont.vue';
|
||||||
|
|
|
@ -24,7 +24,7 @@ import Directory from './directory.vue';
|
||||||
import SwitcherIcon from './switcher-icon.vue';
|
import SwitcherIcon from './switcher-icon.vue';
|
||||||
import ReplaceFields from './replaceFields.vue';
|
import ReplaceFields from './replaceFields.vue';
|
||||||
import ContextMenu from './context-menu.vue';
|
import ContextMenu from './context-menu.vue';
|
||||||
import VirtualScroll from './virtual-scroll';
|
import VirtualScroll from './virtual-scroll.vue';
|
||||||
import CN from '../index.zh-CN.md';
|
import CN from '../index.zh-CN.md';
|
||||||
import US from '../index.en-US.md';
|
import US from '../index.en-US.md';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
|
|
|
@ -51,7 +51,8 @@
|
||||||
"lint:style": "stylelint \"{site,components}/**/*.less\" --syntax less",
|
"lint:style": "stylelint \"{site,components}/**/*.less\" --syntax less",
|
||||||
"codecov": "codecov",
|
"codecov": "codecov",
|
||||||
"routes": "node site/scripts/genrateRoutes.js",
|
"routes": "node site/scripts/genrateRoutes.js",
|
||||||
"tsc": "tsc --noEmit"
|
"tsc": "tsc --noEmit",
|
||||||
|
"site": "yarn routes && ./node_modules/vite/bin/vite.js build site --base=https://aliyuncdn.antdv.com/v2/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -6,6 +6,7 @@ const themeConfig = [
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
htmlThemeAttr: 'dark',
|
htmlThemeAttr: 'dark',
|
||||||
modifyVars: {
|
modifyVars: {
|
||||||
|
hack: `true;@import "${require.resolve('../components/style/color/colorPalette.less')}";`,
|
||||||
...defaultVars,
|
...defaultVars,
|
||||||
...dark,
|
...dark,
|
||||||
'text-color': 'fade(@white, 65%)',
|
'text-color': 'fade(@white, 65%)',
|
||||||
|
@ -36,6 +37,8 @@ const additionalData = async (content: string, filename: string): Promise<string
|
||||||
}
|
}
|
||||||
return Promise.resolve(res);
|
return Promise.resolve(res);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(error);
|
||||||
return Promise.reject(content);
|
return Promise.reject(content);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,6 +13,7 @@ export default {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.join(__dirname, './src'),
|
'@': path.join(__dirname, './src'),
|
||||||
vue: 'vue/dist/vue.esm-bundler.js',
|
vue: 'vue/dist/vue.esm-bundler.js',
|
||||||
|
'ant-design-vue/es': path.resolve(__dirname, '../components'),
|
||||||
'ant-design-vue': path.resolve(__dirname, '../components'),
|
'ant-design-vue': path.resolve(__dirname, '../components'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -43,7 +44,10 @@ export default {
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
less: {
|
less: {
|
||||||
modifyVars: { ...defaultVar },
|
modifyVars: {
|
||||||
|
hack: `true;@import "${require.resolve('../components/style/color/colorPalette.less')}";`,
|
||||||
|
...defaultVar,
|
||||||
|
},
|
||||||
javascriptEnabled: true,
|
javascriptEnabled: true,
|
||||||
// includePaths: ["node_modules/"],
|
// includePaths: ["node_modules/"],
|
||||||
additionalData,
|
additionalData,
|
||||||
|
|
Loading…
Reference in New Issue