Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

Implements a SCSS build pipeline that compiles and minifies CSS for production serving on GitHub Pages.

Changes

  • Build system: Added npm/sass toolchain for SCSS compilation

    • scss/main.scsscss/main.min.css (compressed)
    • Scripts: npm run build:css and npm run watch:css
  • File migration: Moved css/main.cssscss/main.scss via git mv

    • Preserves full commit history (R100 rename detection)
    • git log --follow scss/main.scss traces back to original
  • CI integration: Updated workflow to build CSS before Jekyll

    • Added Node.js setup step
    • Runs npm ci && npm run build:css
    • Verification step: Ensures committed CSS matches SCSS source (prevents stale CSS)
  • Configuration:

    • .gitignore: Excludes node_modules/, package-lock.json, and CSS source maps (css/*.map)
    • Minified CSS committed: css/main.min.css is committed to repository for GitHub Pages serving
    • index.html: Updated reference to css/main.min.css
  • Domain update: Updated all references from cmder.net to cmder.app

    • Updated README.md, package.json, and .gitignore comments
    • Aligns with current CNAME configuration

Build Example

npm install
npm run build:css
# Generates css/main.min.css (4KB minified) from scss/main.scss

CI/CD Validation

The CI workflow automatically verifies that the committed minified CSS is up to date with the SCSS source. If a developer modifies SCSS without rebuilding the CSS, the build will fail with a clear error message indicating that npm run build:css needs to be run and the updated CSS committed.

Original prompt

We need a SCSS build system that automatically builds minified CSS for serving as dist. Note that you need to MOVE the current css file using git mv to preserve the history of the css file, not delete it and create another file.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add SCSS build system and move current CSS file Add SCSS build system with automated CSS minification Nov 13, 2025
Copilot AI requested a review from DRSDavidSoft November 13, 2025 18:26
Copilot finished work on behalf of DRSDavidSoft November 13, 2025 18:26
@DRSDavidSoft
Copy link
Contributor

@copilot since this is a static website served through GitHub.io pages, we need to also push the minified css.

- Remove css/ from .gitignore to commit minified CSS for GitHub Pages
- Ignore only CSS source maps (css/*.map)
- Add CI step to verify committed CSS matches SCSS source
- Ensures CSS is always kept up to date with SCSS changes

Co-authored-by: DRSDavidSoft <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 13, 2025

@copilot since this is a static website served through GitHub.io pages, we need to also push the minified css.

Fixed in cb827b5. The minified CSS is now committed to the repository for GitHub Pages. Also added a CI verification step that checks if the committed CSS matches the SCSS source, ensuring it stays up to date with any SCSS changes.

- Update README.md description
- Update package.json description
- Update .gitignore comment
- Aligns with current domain in CNAME file

Co-authored-by: DRSDavidSoft <[email protected]>
Copilot finished work on behalf of DRSDavidSoft November 13, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants