mirror of
https://gitee.com/HuLaSpark/HuLa.git
synced 2024-11-29 10:18:35 +08:00
e17cb7c24a
移除主题切换时的Transitions效果
43 lines
1002 B
TypeScript
43 lines
1002 B
TypeScript
import pkg from '../../package.json'
|
|
|
|
/** npm依赖包版本信息 */
|
|
export interface PkgVersionInfo {
|
|
name: string
|
|
version: string
|
|
}
|
|
|
|
interface Package {
|
|
name: string
|
|
version: string
|
|
author: Record<string, string>
|
|
dependencies: Record<string, string>
|
|
devDependencies: Record<string, string>
|
|
[key: string]: any
|
|
}
|
|
|
|
interface PkgJson {
|
|
name: string
|
|
version: string
|
|
author: Record<string, string>
|
|
dependencies: PkgVersionInfo[]
|
|
devDependencies: PkgVersionInfo[]
|
|
}
|
|
|
|
const pkgWithType = pkg as Package
|
|
|
|
const transformVersionData = (tuple: [string, string]): PkgVersionInfo => {
|
|
const [name, version] = tuple
|
|
return {
|
|
name,
|
|
version
|
|
}
|
|
}
|
|
|
|
export const pkgJson: PkgJson = {
|
|
name: pkgWithType.name,
|
|
version: pkgWithType.version,
|
|
author: pkgWithType.author,
|
|
dependencies: Object.entries(pkgWithType.dependencies).map((item) => transformVersionData(item)),
|
|
devDependencies: Object.entries(pkgWithType.devDependencies).map((item) => transformVersionData(item))
|
|
}
|