1 Star 0 Fork 0

冰消叶散 / wallpaper-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
copy.script.js 686 Bytes
一键复制 编辑 原始数据 按行查看 历史
/*
* Author:dinglong
* DateTime:2024/1/14 下午 5:19
*/
const fs = require("fs")
try {
const txt = fs.readFileSync("package.json", 'utf8')
let json = JSON.parse(txt)
json.scripts = {
start: 'nodemon main',
rmdir: 'rmdir /s node_modules',
pkg: "pkg . -t win --out-path=dist/"
}
json.pkg = {
assets: ["www/**/*", "logs/**/*"]
}
fs.writeFileSync("./dist/package.json", JSON.stringify(json))
fs.copyFileSync("tsconfig.json", "./dist/tsconfig.json")
let env_txt = fs.readFileSync(".env", 'utf8')
env_txt = env_txt.replace("dev", "pro")
fs.writeFileSync("./dist/.env", env_txt)
} catch (e) {
console.log(e)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dlongs49/wallpaper-server.git
git@gitee.com:dlongs49/wallpaper-server.git
dlongs49
wallpaper-server
wallpaper-server
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891