mirror of https://github.com/vuejs/vitepress
Merge 93f7033a27
into 74a0222f9a
commit
986a6e287a
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,20 @@
|
|||||||
|
import { copy } from 'fs-extra'
|
||||||
|
import { mkdist } from 'mkdist'
|
||||||
|
import { glob } from 'tinyglobby'
|
||||||
|
|
||||||
|
await mkdist({
|
||||||
|
srcDir: 'src/client',
|
||||||
|
distDir: 'dist/client',
|
||||||
|
format: 'esm',
|
||||||
|
declaration: true,
|
||||||
|
addRelativeDeclarationExtensions: true,
|
||||||
|
ext: 'js',
|
||||||
|
pattern: '**/*.{vue,ts,css,woff2}'
|
||||||
|
})
|
||||||
|
|
||||||
|
// skip transpiling .vue files
|
||||||
|
await Promise.all(
|
||||||
|
(await glob('src/client/**/*.vue')).map((file) => {
|
||||||
|
copy(file, file.replace(/^src\//, 'dist/'))
|
||||||
|
})
|
||||||
|
)
|
@ -1,11 +0,0 @@
|
|||||||
import { copy } from 'fs-extra'
|
|
||||||
import { globSync } from 'tinyglobby'
|
|
||||||
|
|
||||||
function toDest(file) {
|
|
||||||
return file.replace(/^src\//, 'dist/')
|
|
||||||
}
|
|
||||||
|
|
||||||
globSync(['src/client/**']).forEach((file) => {
|
|
||||||
if (/(\.ts|tsconfig\.json)$/.test(file)) return
|
|
||||||
copy(file, toDest(file))
|
|
||||||
})
|
|
Loading…
Reference in new issue