mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +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)
|