1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-13 04:19:57 +00:00
elk/scripts/prepare.ts
Vjacheslav Trushkin fa9c418e21
feat: replace emoji with SVGs (#129) (#584)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2023-01-02 05:53:53 +01:00

13 lines
677 B
TypeScript

import { copy } from 'fs-extra'
import { emojiPrefix, iconifyEmojiPackage } from '../config/emojis'
const dereference = process.platform === 'win32' ? true : undefined
await copy('node_modules/shiki-es/dist/assets', 'public/shiki/', {
dereference,
filter: src => src === 'node_modules/shiki/' || src.includes('languages') || src.includes('dist'),
})
await copy('node_modules/theme-vitesse/themes', 'public/shiki/themes', { dereference })
await copy('node_modules/theme-vitesse/themes', 'node_modules/shiki/themes', { overwrite: true, dereference })
await copy(`node_modules/${iconifyEmojiPackage}/icons`, `public/emojis/${emojiPrefix}`, { overwrite: true, dereference })