加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
package.json 6.78 KB
一键复制 编辑 原始数据 按行查看 历史
tkl 提交于 2023-12-23 11:50 . 注释内容
{
"name": "ppx",
"private": true,
"version": "1.1.0",
"description": "PPX是一款基于pywebview和PyInstaller框架,构建macOS和windows平台客户端的应用框架。本框架的视图层支持Vue、React、Angular、HTML中的任意一种,业务层采用本地Python+调用远程API。",
"author": "潘高 <pangao1990@qq.com>",
"scripts": {
"initComments": "清空缓存,配置环境",
"init": "pnpm run clean && pnpm install && pnpm run initInstall",
"clean": "pnpm add -D shx && shx rm -rf build gui/dist gui/node_modules gui/pnpm-lock.yaml pyapp/pyenv pyapp/spec/macos* pyapp/spec/windows* && pnpm prune",
"initInstall": "run-script-os",
"initInstall:macos": "pnpm -C ./gui install && python3 -m venv pyapp/pyenv && ./pyapp/pyenv/bin/python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && ./pyapp/pyenv/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r ./pyapp/requirements.txt && ./pyapp/pyenv/bin/python ./pyapp/package/exe/getAppISSID.py",
"initInstall:windows": "pnpm -C .\\gui install && python -m venv pyapp\\pyenv\\pyenv && .\\pyapp\\pyenv\\pyenv\\Scripts\\python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && .\\pyapp\\pyenv\\pyenv\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r .\\pyapp\\requirements.txt && .\\pyapp\\pyenv\\pyenv\\Scripts\\python .\\pyapp\\package\\exe\\getAppISSID.py",
"initcefComments": "清空缓存,配置CEF环境",
"init:cef": "pnpm install && pnpm -C .\\gui install && python -m venv pyapp\\pyenv\\pyenvCEF && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r .\\pyapp\\requirements.txt && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple cefpython3 && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python .\\pyapp\\package\\exe\\getAppISSID.py",
"startComments": "开发环境",
"start": "run-p dev startos",
"dev": "pnpm -C ./gui run dev",
"startos": "run-script-os",
"startos:macos": "nodemon --config ./pyapp/nodemon.json --exec ./pyapp/pyenv/bin/python -X dev ./main.py",
"startos:windows": "nodemon --config .\\pyapp\\nodemon.json --exec .\\pyapp\\pyenv\\pyenv\\Scripts\\python -X dev .\\main.py",
"startcefComments": "开发环境-cef模式",
"start:cef": "run-p dev startcef",
"startcef": "nodemon --config .\\pyapp\\nodemon.json --exec .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python -X dev .\\main.py --cef",
"preComments": "预打包(带日志输出)",
"pre": "shx rm -rf build && pnpm -C ./gui run build && run-script-os",
"pre:macos": "./pyapp/pyenv/bin/python pyapp/spec/getSpec.py --mac && ./pyapp/pyenv/bin/pyinstaller --clean ./pyapp/spec/macos-pre.spec",
"pre:windows": ".\\pyapp\\pyenv\\pyenv\\Scripts\\python pyapp\\spec\\getSpec.py && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-pre.spec",
"precefComments": "预打包-cef模式",
"pre:cef": ".\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python pyapp\\spec\\getSpec.py && shx rm -rf build && pnpm -C ./gui run build && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-pre-cef.spec",
"prefolderComments": "预打包-文件夹模式",
"pre:folder": ".\\pyapp\\pyenv\\pyenv\\Scripts\\python pyapp\\spec\\getSpec.py && shx rm -rf build && pnpm -C ./gui run build && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder-pre.spec",
"prefoldercefComments": "预打包-cef模式-文件夹模式",
"pre:folder:cef": ".\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python pyapp\\spec\\getSpec.py && shx rm -rf build && pnpm -C ./gui run build && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder-pre-cef.spec",
"buildComments": "正式打包",
"build": "shx rm -rf build && shx rm -rf dist && pnpm -C ./gui run build && run-script-os && shx rm -rf dist && shx rm -rf build/cache",
"build:macos": "./pyapp/pyenv/bin/python pyapp/spec/getSpec.py --mac && ./pyapp/pyenv/bin/pyinstaller --clean ./pyapp/spec/macos.spec && pnpm run build:dmg",
"build:dmg": "shx rm -rf build/*.dmg && ./pyapp/pyenv/bin/python pyapp/package/dmg/getJson.py && appdmg pyapp/package/dmg/dmg.json build/setup.dmg && ./pyapp/pyenv/bin/python pyapp/package/dmg/rename.py",
"build:windows": ".\\pyapp\\pyenv\\pyenv\\Scripts\\python pyapp\\spec\\getSpec.py && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows.spec && pnpm run build:exe",
"build:exe": "shx rm -rf build/*_Windows.exe && .\\pyapp\\pyenv\\pyenv\\Scripts\\python pyapp\\package\\exe\\getIss.py && pyapp\\package\\exe\\InnoSetup6\\ISCC.exe pyapp\\package\\exe\\InnoSetup.iss",
"buildcefComments": "正式打包-cef模式",
"build:cef": ".\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python pyapp\\spec\\getSpec.py && shx rm -rf build && pnpm -C ./gui run build && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-cef.spec && pnpm run build:exe",
"buildfolderComments": "正式打包-文件夹模式",
"build:folder": ".\\pyapp\\pyenv\\pyenv\\Scripts\\python pyapp\\spec\\getSpec.py && shx rm -rf build && pnpm -C ./gui run build && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder.spec",
"buildfoldercefComments": "正式打包-cef模式-文件夹模式",
"build:folder:cef": ".\\pyapp\\pyenv\\pyenvCEF\\Scripts\\python pyapp\\spec\\getSpec.py && shx rm -rf build && pnpm -C ./gui run build && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder-cef.spec",
"alembicComments": "迁移数据库,用法: m=信息备注 pnpm run alembic",
"alembic": "run-script-os",
"alembic:macos": "cd ./pyapp/db/ && ../pyenv/bin/alembic revision --autogenerate -m \"${m}\" && ../pyenv/bin/alembic upgrade head && ../pyenv/bin/alembic upgrade head --sql > ../../static/db/migration.sql && ../pyenv/bin/alembic current > ../../static/db/version",
"alembic:windows": "cd ./pyapp/db/ && ..\\pyenv\\pyenv\\Scripts\\alembic.exe revision --autogenerate -m \"${m}\" && ..\\pyenv\\pyenv\\Scripts\\alembic.exe upgrade head && ..\\pyenv\\pyenv\\Scripts\\alembic.exe upgrade head --sql > ..\\..\\static\\db\\migration.sql && ..\\pyenv\\pyenv\\Scripts\\alembic.exe current > ..\\..\\static\\db\\version"
},
"devDependencies": {
"nodemon": "^2.0.20",
"npm-run-all": "^4.1.5",
"run-script-os": "^1.1.6",
"shx": "^0.3.4"
},
"optionalDependencies": {
"appdmg": "^0.6.6"
},
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@vitejs/plugin-vue": "^4.3.4",
"element-plus": "^2.3.8",
"sass": "^1.68.0",
"vite": "4.3.1",
"vue": "3.2.47",
"vue-router": "^4.2.4"
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化