Configure CSS as generated asset, not committed to git
- Added public/style.css to .gitignore - Removed style.css from git tracking (git rm --cached) - Enhanced package.json scripts for better CSS workflow: - postinstall: Auto-builds CSS on npm install - build-css:dev: Development build with source maps - start: Now builds CSS before starting server - dev: Builds CSS before development mode - Updated README with CSS development documentation - Explains SCSS organization and build process - Documents all CSS-related npm scripts Benefits: ✅ Cleaner repository (no generated files) ✅ Prevents merge conflicts in generated CSS ✅ Automatic CSS generation on new machine setup ✅ Source of truth is SCSS files only ✅ Consistent build process across environments
This commit is contained in:
parent
23a06a5e84
commit
9716fe9f1d
4 changed files with 31 additions and 7 deletions
10
package.json
10
package.json
|
@ -4,14 +4,16 @@
|
|||
"description": "Great Lakes Ice Report - Community-driven winter road conditions tracker for Michigan",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"dev": "nodemon server.js",
|
||||
"start": "npm run build && node server.js",
|
||||
"dev": "npm run build-css && nodemon server.js",
|
||||
"build-css": "sass src/scss/main.scss public/style.css --style=compressed",
|
||||
"watch-css": "sass src/scss/main.scss public/style.css --watch",
|
||||
"build-css:dev": "sass src/scss/main.scss public/style.css --style=expanded --source-map",
|
||||
"watch-css": "sass src/scss/main.scss public/style.css --watch --style=expanded --source-map",
|
||||
"dev-with-css": "concurrently \"npm run watch-css\" \"npm run dev\"",
|
||||
"build": "npm run build-css",
|
||||
"test": "jest --runInBand --forceExit",
|
||||
"test:coverage": "jest --coverage"
|
||||
"test:coverage": "jest --coverage",
|
||||
"postinstall": "npm run build-css"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue