BodyBalanceEvaluation/package.json
2025-07-28 11:59:56 +08:00

119 lines
4.1 KiB
JSON

{
"name": "body-balance-evaluation",
"version": "1.0.0",
"description": "身体平衡评估系统 - 基于多传感器融合技术的专业平衡能力评估与分析系统",
"main": "src/main/main.js",
"scripts": {
"dev": "electron .",
"build": "npm run build:renderer && npm run build:main",
"build:renderer": "cd src/renderer && npm run build",
"build:main": "electron-builder",
"pack": "electron-builder --dir",
"dist": "electron-builder",
"postinstall": "electron-builder install-app-deps",
"start": "electron .",
"start:dev": "electron . --mode development",
"start:prod": "electron . --mode production",
"install:backend": "pip install -r backend/requirements.txt",
"install:frontend": "cd src/renderer && npm install",
"install:all": "npm run install:backend && npm run install:frontend",
"test:backend": "cd backend && python -m pytest tests/ -v",
"test:frontend": "cd src/renderer && npm run test",
"lint:backend": "cd backend && flake8 . --max-line-length=88 --exclude=venv,__pycache__",
"lint:frontend": "cd src/renderer && npm run lint",
"format:backend": "cd backend && black . --line-length=88",
"format:frontend": "cd src/renderer && npm run format",
"clean": "node -e \"const fs = require('fs'); const path = require('path'); ['logs', 'temp', 'node_modules/.cache'].forEach(d => { try { fs.rmSync(d, {recursive: true, force: true}); } catch(e) {} });\"",
"clean:data": "node -e \"const fs = require('fs'); try { fs.rmSync('data', {recursive: true, force: true}); } catch(e) {}\"",
"backup": "node -e \"const fs = require('fs'); const path = require('path'); const archiver = require('archiver'); const date = new Date().toISOString().slice(0,19).replace(/:/g,'-'); const output = fs.createWriteStream(`backup_${date}_data.zip`); const archive = archiver('zip'); archive.pipe(output); archive.directory('data/', false); archive.finalize();\"",
"setup": "npm run install:all && node -e \"const fs = require('fs'); ['data', 'data/patients', 'data/sessions', 'data/exports', 'data/backups', 'logs', 'temp'].forEach(d => fs.mkdirSync(d, {recursive: true}));\"",
"check": "node --version && npm --version && electron --version",
"test": "npm run test:backend && npm run test:frontend"
},
"keywords": [
"balance",
"posture",
"assessment",
"healthcare",
"rehabilitation",
"sensors",
"computer-vision",
"medical-device",
"electron",
"vue",
"mediapipe"
],
"author": {
"name": "zheng shunli",
"email": "dev@example.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/example/body-balance-evaluation.git"
},
"bugs": {
"url": "https://github.com/example/body-balance-evaluation/issues"
},
"homepage": "https://github.com/example/body-balance-evaluation#readme",
"engines": {
"node": ">=16.0.0",
"npm": ">=8.0.0"
},
"devDependencies": {
"electron": "^27.0.0",
"electron-builder": "latest",
"electron-packager": "^17.1.2",
"concurrently": "^7.6.0",
"cross-env": "^7.0.3"
},
"dependencies": {
"axios": "^1.5.0",
"electron-log": "^4.4.8"
},
"config": {
"backend_host": "127.0.0.1",
"backend_port": "5000",
"frontend_port": "5173"
},
"build": {
"appId": "com.bodybalance.evaluation",
"productName": "平衡体态检测系统",
"electronDist": "D:\\electron-v36.4.0-win32-x64",
"electronVersion": "36.4.0",
"directories": {
"output": "dist"
},
"files": [
"src/main/**/*",
"src/renderer/dist/**/*",
"backend/dist/**/*",
"ffmpeg/**/*",
"node_modules/**/*"
],
"extraResources": [
{
"from": "backend/dist",
"to": "backend"
},
{
"from": "ffmpeg",
"to": "ffmpeg"
}
],
"win": {
"target": "nsis",
"icon": "assets/icon.ico",
"arch": [
"x64"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true
}
}
}