mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 03:27:00 +08:00
14 lines
362 B
JavaScript
14 lines
362 B
JavaScript
const fs = require('node:fs')
|
|
const path = require('node:path')
|
|
|
|
const root = path.resolve(__dirname, '..')
|
|
const source = path.join(root, '.env.example')
|
|
const target = path.join(root, '.env')
|
|
|
|
if (!fs.existsSync(source) || fs.existsSync(target)) {
|
|
process.exit(0)
|
|
}
|
|
|
|
fs.copyFileSync(source, target)
|
|
console.log('[ensure-env] created .env from .env.example')
|