Add Sass build pipeline and production deploy script

- Move hand-authored CSS into src/scss/styles.scss, compiled to the
  tracked styles.css via `npm run build` (sass, no source maps).
- Add package.json/package-lock.json with dev tooling: sass, and a
  `dev` script running php + sass --watch + browser-sync together.
- Add scripts/build-dist.js (npm run dist): assembles an allowlisted,
  production-only copy of the site into dist/ (gitignored) for pushing
  to hosting — excludes node_modules, src/, package files, and the
  live db/fitz.sqlite while including config.php.
- .gitignore: ignore node_modules/, styles.css.map, and dist/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
David DyerandClaude Sonnet 5 committed 2026-09-01 18:21:01 -04:00
1 parent cd4c6c1969
commit 2145094e55
6 files changed
+6709 -1993

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
{
"name": "theoldfitz",
"version": "1.0.0",
"description": "The Old Fitz Public House website",
"main": "main.js",
"scripts": {
"dev": "concurrently --kill-others-on-fail \"npm:dev:php\" \"npm:dev:sass\" \"npm:dev:browser\"",
"dev:php": "php -S localhost:8000",
"dev:sass": "sass --watch --source-map src/scss/styles.scss:styles.css",
"dev:browser": "browser-sync start --proxy http://localhost:8000 --files \"*.php,admin/**/*.php,inc/**/*.php,main.js,styles.css\" --no-open",
"build": "sass --no-source-map src/scss/styles.scss:styles.css",
"dist": "npm run build && node scripts/build-dist.js"
},
"repository": {
"type": "git",
"url": "https://gitea.home.daviddyer.me/david/the-old-fitz.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"devDependencies": {
"browser-sync": "^3.0.4",
"concurrently": "^10.0.5",
"sass": "^1.103.1"
}
}