mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
9 lines
298 B
JavaScript
9 lines
298 B
JavaScript
const { writeFileSync } = require('fs');
|
|
const { argv } = require('yargs');
|
|
const pkg = require('../package.json');
|
|
|
|
if (argv.dev) pkg.version = `${pkg.version}-dev`;
|
|
else pkg.version = pkg.version.replace('-dev', '');
|
|
|
|
writeFileSync(`${process.cwd()}/package.json`, JSON.stringify(pkg, null, 2));
|