naive-ui/scripts/gen-version.js

7 lines
182 B
JavaScript
Raw Normal View History

2020-07-22 17:40:38 +08:00
const version = require('../package.json').version
require('fs').writeFileSync(
require('path').resolve(__dirname, '..', 'src', 'version.ts'),
2020-07-22 17:40:38 +08:00
`export default '${version}'\n`
)