UNPKG

albertgao.common-electron

Version:

个人常用的nodejs/electron模块

25 lines (24 loc) 662 B
/** * */ async function test() { const Path = require('path') // 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' }) const { xlsxWriter } = require('./workers') const xlsx = xlsxWriter() await xlsx.write(Path.join(__dirname, 'dist/test.xlsx'), [ { a: 1, b: 2 }, { a: 2, b: 3 } ]) xlsx.kill() } test()