UNPKG

albertgao.common-electron

Version:

个人常用的nodejs/electron模块

17 lines (16 loc) 412 B
/** * */ async function update() { const Fs = require('fs-extra') const json = Fs.readJsonSync('./package.json') const d = new Date() const common = require('./index') const { keep0s } = common json.version = `0.0.1-alpha.${d.getFullYear()}-${keep0s( d.getMonth() + 1, 2 )}-${keep0s(d.getDate(), 2)}.${d.getTime()}` Fs.writeJsonSync('./package.json', json, { spaces: '\t' }) } update()