Adds Prettier formatting and PHP support

Adds Prettier for consistent code formatting across the project.
Includes PHP plugin and configures formatting for PHP files.
Adds format and format:check scripts to package.json for ease of use.
This commit is contained in:
2025-09-06 12:10:22 +02:00
parent d848d09800
commit 94078a7e6f
4 changed files with 258 additions and 17 deletions
+6 -2
View File
@@ -11,9 +11,13 @@
"build": "npx @tailwindcss/cli -i ./src/css/input.css -o ./assets/css/styles.css --content './site/**/*.php'",
"serve": "php -S localhost:8000 vendor/getkirby/cms/router.php",
"sync": "npx browser-sync start --proxy \"localhost:8000\" --files \"site/**/*.php,assets/**/*.css,assets/**/*.js,content/**/*.txt\" --no-open",
"dev": "concurrently \"npm run serve\" \"npm run sync\""
"dev": "concurrently \"npm run serve\" \"npm run sync\"",
"format": "prettier --write \"site/**/*.php\" \"content/**/*.txt\"",
"format:check": "prettier --check \"site/**/*.php\" \"content/**/*.txt\""
},
"devDependencies": {
"concurrently": "^9.2.0"
"@prettier/plugin-php": "^0.24.0",
"concurrently": "^9.2.0",
"prettier": "^3.6.2"
}
}