naive-ui/scripts/generate-version.js

7 lines
182 B
JavaScript

const version = require('../package.json').version
require('fs').writeFileSync(
require('path').resolve(__dirname, '..', 'src', 'version.ts'),
`export default '${version}'\n`
)