wot-design-uni/scripts/changelog.ts
2025-01-24 23:30:36 +08:00

15 lines
458 B
TypeScript

import fs from 'fs'
import path from 'path'
const fromPath = path.resolve(__dirname, '../CHANGELOG.md')
const toPath = path.resolve(__dirname, '../src/uni_modules/wot-design-uni')
const docPath = path.resolve(__dirname, '../docs/guide')
try {
const file = fs.readFileSync(fromPath, 'utf-8')
fs.writeFileSync(`${toPath}/changelog.md`, file)
fs.writeFileSync(`${docPath}/changelog.md`, file)
} catch (error) {
console.log('CHANGELOG 获取失败')
}