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