Initial rearrangment of vuetom site source

This commit is contained in:
2024-10-09 08:23:08 +00:00
parent dbd456a517
commit e9d08bd263
233 changed files with 22841 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
import fs from 'fs'
import path from 'path'
export const languages = fs.readdirSync(
path.resolve(__dirname, '../crowdin')
)
export const changeLang = (lang: string) => `/${lang}`

View File

@@ -0,0 +1,23 @@
import process from 'process'
import chalk from 'chalk'
export function cyan(str: string) {
console.log(chalk.cyan(str))
}
export function yellow(str: string) {
console.log(chalk.yellow(str))
}
export function green(str: string) {
console.log(chalk.green(str))
}
export function red(str: string) {
console.error(chalk.red(str))
}
export function errorAndExit(e: Error): never {
red(e.stack ?? e.message)
process.exit(1)
}

View File

@@ -0,0 +1,6 @@
import path from 'path'
export const vpRoot = path.resolve(__dirname, '..')
export const docRoot = path.resolve(vpRoot, '..')
export const pkgsRoot = path.resolve(docRoot, '..')
export const projRoot = path.resolve(pkgsRoot, '..')