-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
24 lines (24 loc) · 2.4 KB
/
Copy pathpackage.json
File metadata and controls
24 lines (24 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"name": "dualsense-command-center",
"version": "0.4.1",
"description": "Clean-room Rust and TypeScript command center for PlayStation DualSense and DualSense Edge controllers.",
"private": true,
"scripts": {
"check": "npm run check:web && npm run check:rust",
"check:perf": "node tools/check-perf.mjs",
"check:web": "npm --prefix web run check",
"check:rust": "node -e \"const { spawnSync } = require('node:child_process'); const cargo = process.platform === 'win32' ? ['+stable-x86_64-pc-windows-gnu'] : []; const commands = [['fmt', '--all', '--', '--check'], ['test', '--workspace', '--all-features'], ['clippy', '--workspace', '--all-targets', '--', '-D', 'warnings']]; for (const args of commands) { const result = spawnSync('cargo', cargo.concat(args), { stdio: 'inherit' }); if (result.error) throw result.error; if (result.status !== 0) process.exit(result.status ?? 1); }\"",
"dev": "node -e \"const { spawn } = require('node:child_process'); const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; const children = ['dev:agent', 'dev:web'].map((script) => spawn(npm, ['run', script], { stdio: 'inherit' })); let stopping = false; const stop = (code = 0) => { if (stopping) return; stopping = true; for (const child of children) child.kill('SIGINT'); setTimeout(() => process.exit(code), 500); }; process.on('SIGINT', () => stop(0)); process.on('SIGTERM', () => stop(0)); for (const child of children) { child.on('error', (error) => { console.error(error); stop(1); }); child.on('exit', (code) => { if (!stopping) stop(code ?? 0); }); }\"",
"dev:web": "npm --prefix web run dev",
"dev:web:mock": "npm --prefix web run dev:mock",
"dev:agent": "node -e \"const { spawn } = require('node:child_process'); const cargo = process.platform === 'win32' ? ['+stable-x86_64-pc-windows-gnu'] : []; const child = spawn('cargo', cargo.concat(['run', '-p', 'dscc-cli', '--', 'serve', '--addr', '127.0.0.1:43473']), { stdio: 'inherit' }); child.on('error', (error) => { throw error; }); child.on('exit', (code) => process.exit(code ?? 0));\"",
"web:build": "npm --prefix web run build",
"web:typecheck": "npm --prefix web run typecheck",
"web:dev": "npm --prefix web run dev",
"web:dev:mock": "npm --prefix web run dev:mock",
"web:preview": "npm --prefix web run preview",
"web:test:button-map": "npm --prefix web run test:button-map"
},
"license": "Apache-2.0",
"type": "commonjs"
}