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:
+6
-2
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user