diff --git a/.yarnrc.yaml b/.yarnrc.yaml new file mode 100644 index 00000000..7e4c8770 --- /dev/null +++ b/.yarnrc.yaml @@ -0,0 +1 @@ +nodeLinker: 'node-modules' diff --git a/docs/.gitignore b/docs/.gitignore index cd7b522a..34a44fc0 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1,2 @@ .data.json +.temp diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts deleted file mode 100644 index d6f84110..00000000 --- a/docs/.vitepress/config.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { config } from 'dotenv' -import { resolve } from 'path' -import { defineConfig, HeadConfig } from 'vitepress' -import WindiCSS from 'vite-plugin-windicss' -import Icons from 'unplugin-icons/vite' -import Components from 'unplugin-vue-components/vite' -import svgLoader from 'vite-svg-loader' -import { demoPlugin } from './plugins/demo' -import head from './head' - -config({ path: resolve(__dirname, '.env') }) - -export default defineConfig({ - title: 'Vue Flow', - lastUpdated: true, - srcDir: './src', - head: head as HeadConfig[], - - vite: { - resolve: { - alias: { - '~': resolve('../../package/src'), - }, - }, - plugins: [ - svgLoader(), - WindiCSS({ - config: resolve(__dirname, './windi.config.ts'), - }) as any, - Components({ - dirs: [resolve(__dirname, './components')], - deep: true, - // allow auto load markdown components under `./src/components/` - extensions: ['vue', 'md'], - // allow auto import and register components used in markdown - include: [/\.vue$/, /\.vue\?vue/, /\.md$/], - dts: false, - }), - Icons({ - // expiremental - autoInstall: true, - }), - ], - }, - - themeConfig: { - repo: 'bcakmakoglu/vue-flow', - docsDir: 'docs', - docsBranch: 'master', - lastUpdated: 'Last Updated', - - algolia: { - appId: 'YCY25RSLA8', - apiKey: process.env.ALGOLIA_API_KEY, - indexName: (process.env.NODE_ENV !== 'production' ? 'dev_' : 'prod_') + 'VUE-FLOW', - }, - - nav: [ - { text: 'Guide', link: '/', activeMatch: '^/$|^/guide/' }, - { - text: 'Examples', - link: '/examples/basic', - activeMatch: '^/examples/', - }, - ], - }, - - markdown: { - config(md) { - md.use(demoPlugin) - return md - }, - }, -}) diff --git a/docs/.vitepress/plugins/demo.ts b/docs/.vitepress/plugins/demo.ts deleted file mode 100644 index a0f2057c..00000000 --- a/docs/.vitepress/plugins/demo.ts +++ /dev/null @@ -1,70 +0,0 @@ -import fs from 'fs' -import path from 'path' -import MarkdownIt from 'markdown-it' -import { highlight } from './highlight' - -interface HoistedTags { - script: string[] - style: string[] - components: string[] -} - -type ExtendedMarkdownParsedData = { hoistedTags: HoistedTags } - -let index = 1 -// hoist