refactor: migrate from shiki to shikiji (#2520)

This commit is contained in:
ocavue 2023-12-21 02:54:40 +08:00 committed by GitHub
parent e63473a5f8
commit 74138a9a58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 124 additions and 223 deletions

View file

@ -5,12 +5,6 @@ import { colorsMap } from './generate-themes'
const dereference = process.platform === 'win32' ? true : undefined
await fs.copy('node_modules/shiki-es/dist/assets', 'public/shiki/', {
dereference,
filter: src => src === 'node_modules/shiki/' || src.includes('languages') || src.includes('dist'),
})
await fs.copy('node_modules/theme-vitesse/themes', 'public/shiki/themes', { dereference })
await fs.copy('node_modules/theme-vitesse/themes', 'node_modules/shiki/themes', { overwrite: true, dereference })
await fs.copy(`node_modules/${iconifyEmojiPackage}/icons`, `public/emojis/${emojiPrefix}`, { overwrite: true, dereference })
await fs.writeJSON('constants/themes.json', colorsMap, { spaces: 2, EOL: '\n' })