puppeteer/utils/generate_version_file.js

10 lines
319 B
JavaScript
Raw Normal View History

2022-05-09 11:17:24 +00:00
const { writeFileSync, readFileSync } = require('fs');
const { join } = require('path');
writeFileSync(
join(__dirname, '../src/generated/version.ts'),
readFileSync(join(__dirname, '../src/templates/version.ts.tmpl'), {
encoding: 'utf-8',
}).replace('PACKAGE_VERSION', require('../package.json').version)
);