naive-ui/build-doc/generate-deploy-sh.js
2020-07-08 23:02:26 +08:00

14 lines
296 B
JavaScript

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
)