mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
457 B
21 lines
457 B
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/'))
|
|
})
|
|
)
|