forked from pangao1990/myChat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
61 lines (61 loc) · 5.72 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"name": "ppx",
"private": true,
"version": "1.0.0",
"description": "基于pywebview和PyInstaller框架,构建macOS和windows平台的客户端。本应用的视图层支持Vue、React、Angular、HTML中的任意一种,业务层采用本地Python+调用远程API。",
"author": "潘高 <[email protected]>",
"scripts": {
"initComments": "清空缓存,配置环境",
"init": "npm install -D shx && npm run clean && npm install && npm run initInstall",
"clean": "shx rm -rf build node_modules pyapp/pyenv package-lock.json gui/node_modules gui/package-lock.json",
"initInstall": "run-script-os",
"initInstall:macos": "npm install --prefix ./gui && python3 -m venv pyapp/pyenv && ./pyapp/pyenv/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r ./pyapp/requirements.txt",
"initInstall:windows": "npm install --prefix .\\gui && python -m venv pyapp\\pyenv\\pyenv && .\\pyapp\\pyenv\\pyenv\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r .\\pyapp\\requirements.txt",
"initcefComments": "清空缓存,配置CEF环境",
"init:cef": "shx rm -rf pyapp\\pyenv\\pyenvCEF && python -m venv pyapp\\pyenv\\pyenvCEF && .\\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",
"startComments": "开发环境",
"start": "run-p dev startos",
"dev": "npm run dev --prefix ./gui",
"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 && npm run build --prefix ./gui && run-script-os",
"pre:macos": "python3 pyapp/spec/getSpec.py --mac && ./pyapp/pyenv/bin/pyinstaller --clean ./pyapp/spec/macos-pre.spec",
"pre:windows": "python pyapp\\spec\\getSpec.py && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-pre.spec",
"precefComments": "预打包-cef模式",
"pre:cef": "python pyapp\\spec\\getSpec.py && shx rm -rf buildCEF && npm run build --prefix ./gui && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-pre-cef.spec && shx mv .\\build\\windows-pre-cef .\\buildCEF\\windows-pre-cef",
"prefolderComments": "预打包-文件夹模式",
"pre:folder": "python pyapp\\spec\\getSpec.py && shx rm -rf build && npm run build --prefix ./gui && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder-pre.spec",
"prefoldercefComments": "预打包-cef模式-文件夹模式",
"pre:folder:cef": "python pyapp\\spec\\getSpec.py && shx rm -rf buildCEF && npm run build --prefix ./gui && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder-pre-cef.spec && shx mv .\\build\\windows-folder-pre-cef .\\buildCEF\\windows-folder-pre-cef",
"buildComments": "正式打包",
"build": "shx rm -rf build && npm run build --prefix ./gui && run-script-os",
"build:macos": "python3 pyapp/spec/getSpec.py --mac && ./pyapp/pyenv/bin/pyinstaller --clean ./pyapp/spec/macos.spec && npm run build:dmg",
"build:dmg": "shx rm -rf build/*.dmg && python3 pyapp/package/dmg/getJson.py && appdmg pyapp/package/dmg/dmg.json build/myChat.dmg",
"build:windows": "python pyapp\\spec\\getSpec.py && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows.spec && npm run build:exe",
"build:exe": "shx rm -rf build/myChat_setup.exe && python pyapp\\package\\exe\\getIss.py",
"buildcefComments": "正式打包-cef模式",
"build:cef": "python pyapp\\spec\\getSpec.py && shx rm -rf buildCEF && npm run build --prefix ./gui && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-cef.spec && shx mv .\\build\\windows-cef .\\buildCEF\\windows-cef",
"buildfolderComments": "正式打包-文件夹模式",
"build:folder": "python pyapp\\spec\\getSpec.py && shx rm -rf build && npm run build --prefix ./gui && .\\pyapp\\pyenv\\pyenv\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder.spec",
"buildfoldercefComments": "正式打包-cef模式-文件夹模式",
"build:folder:cef": "python pyapp\\spec\\getSpec.py && shx rm -rf buildCEF && npm run build --prefix ./gui && .\\pyapp\\pyenv\\pyenvCEF\\Scripts\\pyinstaller --clean .\\pyapp\\spec\\windows-folder-cef.spec && shx mv .\\build\\windows-folder-cef .\\buildCEF\\windows-folder-cef",
"alembicComments": "迁移数据库,用法: m=信息备注 npm 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"
}
}