-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpackage.json
More file actions
64 lines (64 loc) · 3.06 KB
/
Copy pathpackage.json
File metadata and controls
64 lines (64 loc) · 3.06 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
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
62
63
64
{
"name": "simple-swipe-card",
"version": "3.1.0",
"description": "A swipeable container for multiple cards with touch and mouse gesture support, visibility conditions, and reset after timeout",
"main": "build/simple-swipe-card.js",
"type": "module",
"scripts": {
"// === CORE COMMANDS (no maps) ===": "",
"dev": "NODE_ENV=development npx rollup -c -w",
"deploy": "NODE_ENV=development npx rollup -c && npm run deploy:copy",
"deploy:prod": "NODE_ENV=production MINIFY=false npx rollup -c && npm run deploy:copy",
"deploy:minified": "NODE_ENV=production MINIFY=true npx rollup -c && npm run deploy:copy",
"// === BUILD COMMANDS (with maps) ===": "",
"build": "NODE_ENV=development SOURCEMAP=true npx rollup -c",
"build:prod": "NODE_ENV=production MINIFY=false SOURCEMAP=true npx rollup -c",
"build:minified": "NODE_ENV=production MINIFY=true SOURCEMAP=true npx rollup -c",
"// === DEPLOY HELPER ===": "",
"deploy:copy": "rsync -rlvh --delete ./build/ /workspace/homeassistant/www/simple-swipe-card/",
"// === EXISTING COMMANDS ===": "",
"lint": "npx eslint src/**/*.js",
"lint:fix": "npx eslint src/**/*.js --fix",
"format": "prettier --write 'src/**/*.js'",
"format:check": "prettier --check 'src/**/*.js'",
"version-check": "node -e \"const pkg=require('./package.json'); const fs=require('fs'); const constantsPath='src/utils/Constants.js'; const constants=fs.readFileSync(constantsPath,'utf8'); const versionMatch=constants.match(/export const CARD_VERSION = [\\\"']([^\\\"']+)[\\\"']/); if(!versionMatch || pkg.version !== versionMatch[1]) { console.error('⌠Version mismatch! package.json:',pkg.version,'Constants.js:',versionMatch?versionMatch[1]:'not found'); process.exit(1); } else { console.log('✅ Versions match:',pkg.version); }\"",
"size-check": "npm run deploy:minified --silent && echo '📦 Final build size:' && ls -lh build/simple-swipe-card.js",
"validate": "npm run version-check && npm run size-check",
"pre-release": "npm run format && npm run lint && npm run deploy:prod && npm run validate",
"release": "npm run clean && npm run pre-release && npm run deploy:minified && echo '🎉 Release ready! File: build/simple-swipe-card.js'",
"release:auto": "node scripts/release.js",
"clean": "rimraf build/*.js *.map",
"test:build": "npm run deploy:prod && echo '✅ Production build test passed'"
},
"dependencies": {
"lit": "^3.0.0"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@mdi/js": "^7.4.47",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-terser": "^1.0.0",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"globals": "^17.6.0",
"prettier": "^3.0.0",
"rimraf": "^6.1.3",
"rollup": "^4.61.0"
},
"keywords": [
"swipeable",
"container",
"home-assistant",
"custom-card",
"wrapper-card",
"swipe-card",
"container-card",
"card-carousel",
"multi-card",
"swipe-navigation",
"touch-gestures",
"lovelace"
],
"author": "nutteloost",
"license": "MIT"
}