FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cebreus/gulp-devstack at gulp5 · GitHub

/ gulp-devstack Public template
 
 

Latest commit

 

History

521 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gulp DevStack

High-control static web workflow with predictable output and zero-trust validation. Built on Gulp 5, Nunjucks, Dart Sass, PostCSS, esbuild, and Sharp.


Quickstart

git clone https://github.com/cebreus/gulp-devstack.git
cd gulp-devstack
pnpm install
pnpm dev

Edit src/routes/index.md to change the homepage content, then open http://localhost:3000.


Architectural Philosophy

Gulp DevStack is designed for developers who demand precision. It rejects framework abstractions in favor of explicit control and deterministic output.

1. Template-Based Routing

Every routable Nunjucks template in src/routes/ maps directly to public HTML. Internal layout files use the layout-*.njk prefix and are excluded from output.

  • src/routes/index.njk → /
  • src/routes/404.njk → /404.html
  • src/routes/about/index.njk → /about/

2. Hybrid Data Architecture (The Merge Pattern)

Routes support an "Override & Merge" pattern. If a folder contains both .njk (template) and .md (data), the build engine automatically merges them. The .md frontmatter and content are compiled into .temp/pages/*.json and injected into the Nunjucks context as page, allowing a clean split between presentation and content.

3. Isolated Page Assets

To prevent bundle bloat, the pipeline supports Asset Autodiscovery. If you create src/routes/my-page/index.scss or index.js, they are automatically compiled and injected only into that specific page.


Technical Standards & Pipeline

Triple-Pipeline Strategy

  1. Development Mode (pnpm dev): Optimized for speed. Hot-reloading via BrowserSync (strictly on port 3000), source maps, and incremental builds.
  2. Production Build (pnpm build): Optimized for security and performance. Assets are revisioned (fingerprinted), SRI hashes are injected, and CSS is purged.
  3. Export Mode (pnpm export): A clean handoff mode. It keeps readable, non-hashed CSS/JS and formats HTML, while preserving the same route structure as the production build.

Zero-Trust Verification

The verify:pipeline command ensures the project never regresses:

  • WCAG Audits: Automated accessibility checks via Playwright and Axe-core.

  • Link Integrity: Exhaustive validation of all internal links and anchors.

  • Visual Parity: Automated screenshot comparison between Build and Export modes to ensure visual consistency across pipelines.

  • Strict Validation: HTML5 structure verification via html-validate.

  • Graph Awareness: graphify update . refreshes graphify-out/graph.json, graphify-out/graph.html, and graphify-out/GRAPH_REPORT.md after code changes.

Local Bitmap Placeholders

The image task catalogs the bitmap files it actually emitted, including their oriented intrinsic dimensions and available formats. Opaque local images also receive a generated 20px WebP LQS class backed by cacheable /assets/css/lqs.css; transparent images receive dimensions but no placeholder. Templates opt in explicitly through the shared responsiveImage macro and site.localImages descriptors. External/CDN images and SVG remain unchanged.


Project Structure

├── gulp/              # Modular task definitions & pipeline logic
├── scripts/           # Release, lint wrapper, and hook support scripts
├── src/
│   ├── assets/        # Global images, fonts, and icons
│   ├── config/        # Centralized site metadata (site.js, env.js)
│   ├── js/            # Global scripts bundled via esbuild
│   ├── lib/           # Shared Nunjucks components & partials
│   ├── routes/        # Source for pages (Routing & Content)
│   └── scss/          # Global styles (Bootstrap 5.3 + Custom overrides)
├── tests/
│   ├── unit/          # Pure logic testing
│   ├── integration/   # Pipeline & Gulp task validation
│   ├── e2e/           # Browser-based integrity & A11y checks
│   └── visual/        # Cross-pipeline visual parity checks
├── docs/              # Technical documentation
├── memories/          # Agent-maintained project gotchas
└── graphify-out/      # Knowledge graph outputs

Advanced Commands

  • pnpm verify:pipeline - The canonical CI/CD check.
  • pnpm test:ci - Runs lint, test, test:docs, build, test:smoke, build:validate:html, and test:prod/test:e2e; creates the required build artifact itself.
  • pnpm test:visual - Run visual regression tests.
  • pnpm run component - Scaffold new Nunjucks/SCSS components via Plop.
  • graphify update . - Refresh the local code graph after code changes.

License

MIT - Developed by Jaroslav Vrana

About

Gulp stack for building optimized static pages and exports for collaboration between coders and programmers.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL