🌐 Live Demo: https://matecube.github.io/roos/
A modern build setup for HTML projects with SCSS compilation, autoprefixer, and image optimization.
- ✅ Auto-scanning HTML pages (no manual config needed)
- ✅ SCSS compilation with autoprefixer
- ✅ Fast HMR (Hot Module Replacement) in development
- ✅ Production build with minification
- ✅ HTML partials support (posthtml-include)
- ✅ Tailwind-like utility classes
npm installStart the development server with auto-reload:
npm run devThe server will start at http://localhost:5173 (or the next available port).
Build optimized files for production:
npm run buildOutput will be in the dist/ directory at the root level (same directory as src/).
Preview the production build locally:
npm run previewsrc/
├── *.html # All HTML pages (auto-discovered)
├── scss/
│ ├── main.scss # Main stylesheet
│ ├── _variables.scss
│ ├── _mixins.scss
│ └── _utilities.scss
├── js/
│ └── main.js # Main JavaScript file
├── images/ # Image files
└── partials/ # HTML partials (head, header, footer, etc.)
Simply add a new .html file in the src/ directory. It will be automatically discovered and included in the build.
-
Place images in
src/images/directory:src/ └── images/ ├── photo.jpg ├── logo.png └── banner.webp -
Reference images in your HTML:
<img src="./images/photo.jpg" alt="Photo" />- During Build: Images are copied to
dist/assets/images/maintaining the same directory structure - Directory Structure:
src/images/→dist/assets/images/ - Filenames: Images keep their original names (no hashes)
After building, images are placed in:
dist/
└── assets/
└── images/
├── photo.jpg
├── banner.png
└── logo.webp
- Variables and mixins
- Nested selectors
- Autoprefixer (vendor prefixes added automatically)
- Source maps in development
- Tailwind-like utility classes for spacing, colors, and more
Use HTML partials for reusable components:
<include src="partials/head.html"></include>
<include src="partials/header.html"></include>Partials are located in src/partials/ and are processed during build.