feat: add automatic CSS formatting with Prettier
Integrates Prettier into the stylesheet store for automatic CSS formatting: - Installs prettier v3.7.4 with postcss plugin - Implements formatContent() function using Prettier API - Auto-formats CSS after 500ms of inactivity (debounced) - Prevents infinite loops with isFormatting flag - Ensures consistent indentation and line breaks - Cleans up extra blank lines and formatting issues This ensures the CSS in the Code tab stays clean and properly formatted after reactive edits from TextSettings and PageSettings panels. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
628f666d6a
commit
94112ab1a8
3 changed files with 55 additions and 2 deletions
|
|
@ -13,6 +13,7 @@
|
|||
"highlight.js": "^11.11.1",
|
||||
"pagedjs": "^0.4.3",
|
||||
"pinia": "^3.0.4",
|
||||
"prettier": "^3.7.4",
|
||||
"vue": "^3.5.24"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue