naive-ui/build-doc/generate-deploy-sh.js

14 lines
296 B
JavaScript
Raw Normal View History

2020-07-08 23:02:26 +08:00
const fs = require('fs')
const path = require('path')
const tpl = fs.readFileSync(
path.resolve(__dirname, 'deploy-doc.sh.tpl')
).toString()
const script = tpl.replace(/\$VERSION/g, require('../package.json').version)
fs.writeFileSync(
path.resolve(__dirname, 'deploy-doc.sh'),
script
)