refactor(npm): more robust yet simple package.json

This commit is contained in:
2026-05-08 22:54:36 +03:30
parent 1649b25f05
commit 6bd3a0174d

View File

@@ -1,10 +1,16 @@
{ {
"name": "@db/VP", "name": "@db/VP",
"version": "0.0.2", "version": "0.0.2",
"description": "Low-latency video player with HLS.js and WebRTC/WHEP support",
"license": "CC-BY-NC-SA-4.0",
"repository": {
"type": "git",
"url": "https://git.db123.ir/db/VP"
},
"type": "module", "type": "module",
"main": "./dist/video-player.cjs.js", "sideEffects": [
"module": "./dist/video-player.es.js", "*.css"
"types": "./dist/index.d.ts", ],
"exports": { "exports": {
".": { ".": {
"import": "./dist/video-player.es.js", "import": "./dist/video-player.es.js",
@@ -20,7 +26,6 @@
"scripts": { "scripts": {
"dev": "vite build --watch", "dev": "vite build --watch",
"build": "tsc --emitDeclarationOnly && vite build", "build": "tsc --emitDeclarationOnly && vite build",
"build:raw": "tsc",
"test": "vitest run", "test": "vitest run",
"test:watch": "vitest", "test:watch": "vitest",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
@@ -29,7 +34,11 @@
"preview": "vite preview", "preview": "vite preview",
"prepublishOnly": "npm run lint && npm run format && npm run test && npm run build" "prepublishOnly": "npm run lint && npm run format && npm run test && npm run build"
}, },
"peerDependencies": {
"hls.js": "^1.6.16"
},
"devDependencies": { "devDependencies": {
"hls.js": "^1.6.16",
"@eslint/js": "^9.39.4", "@eslint/js": "^9.39.4",
"@types/eslint": "^9.6.1", "@types/eslint": "^9.6.1",
"@types/node": "^25.6.0", "@types/node": "^25.6.0",
@@ -41,8 +50,5 @@
"typescript-eslint": "^8.59.0", "typescript-eslint": "^8.59.0",
"vite": "^8.0.9", "vite": "^8.0.9",
"vitest": "^4.1.5" "vitest": "^4.1.5"
},
"dependencies": {
"hls.js": "^1.6.16"
} }
} }