mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
851242e317
* feat(docs): add source and contributors closes #6038 * feat(docs): ignore contributor when dev * ci: add github token * fix: lint * fix: page * fix: placeholder * ci: remove preview
11 lines
314 B
TypeScript
11 lines
314 B
TypeScript
import fs from 'fs'
|
|
import path from 'path'
|
|
import { docRoot } from '@element-plus/build'
|
|
|
|
export const languages = fs.readdirSync(path.resolve(__dirname, '../crowdin'))
|
|
|
|
export const ensureLang = (lang: string) => `/${lang}`
|
|
|
|
export const getLang = (id: string) =>
|
|
path.relative(docRoot, id).split(path.sep)[0]
|