mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-15 04:42:23 +08:00
9 lines
357 B
JavaScript
9 lines
357 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
const demoPath = path.resolve(__dirname, '../demo/demo.vue')
|
|
const demoPage = fs.readFileSync(demoPath).toString()
|
|
const version = require('../package.json').version
|
|
const newDemoPage = demoPage.replace(/name="NAIVE UI \(.*?\)"/, `name="NAIVE UI (${version})"`)
|
|
fs.writeFileSync(demoPath, newDemoPage)
|