Files
rpg-companion-sillytavern/package.json
T
ARIA df7d3b3a38 Fixes #13: CSS performance optimizations
- Add CSS minification support to build script (--minify flag)
  - Pure JS minifier: removes comments, whitespace, redundant chars
  - Reports size reduction percentage
  - Preserves CSS custom properties, data URIs, strings

- Refactor _08_themes.css: extend CSS custom properties pattern
  - Define theme-specific properties per theme (--rpg-content-bg,
    --rpg-content-box-shadow, --rpg-header-text-shadow, etc.)
  - Replace triple-theme selector duplication with single [data-theme]
    selectors — children inherit variables automatically
  - Reduces themes.css from 379 to ~220 lines
  - Reduces style.css from 305KB to 294KB (3.8% reduction)

- Add build:css:min npm script for production builds
- Add 9 tests for CSS build: minification, size reduction, CSS
  variable preservation, data URI preservation, theme refactoring
2026-07-12 14:55:36 +02:00

28 lines
728 B
JSON

{
"name": "rpg-companion-sillytavern",
"version": "3.7.4",
"description": "RPG Companion extension for SillyTavern",
"main": "index.js",
"type": "module",
"scripts": {
"build:css": "node scripts/build-css.js",
"build:css:min": "node scripts/build-css.js --minify",
"test": "jest",
"validate_locale": "node src/i18n/validator.js --watch",
"validate_locale_once": "node src/i18n/validator.js"
},
"keywords": [],
"author": "",
"license": "MIT",
"devDependencies": {
"@babel/core": "^8.0.1",
"@babel/preset-env": "^8.0.2",
"@jest/globals": "^30.4.1",
"chokidar": "^5.0.0",
"execa": "^9.6.1",
"fs-extra": "^11.3.3",
"glob": "^13.0.6",
"jest": "^30.4.2"
}
}