How startbootstrap/startbootstrap-landing-page works
Project Type and Purpose
• Type: A static front-end landing‐page template built with Pug, SCSS, and JavaScript.
• Purpose: Provide a Bootstrap-based multipurpose landing page; authors work in src/, then compile into deployable static files in dist/.
File Structure
• Top-level:
– src/ – source assets:
• src/pug/ – Pug templates → HTML
• src/scss/ – SCSS styles → CSS
• src/js/ – custom scripts → JS
• src/assets/img/ – images
– scripts/ – custom Node.js build‐and‐dev utilities
– dist/ – generated output: ready‐to‐serve HTML, CSS, JS, images
– package.json – npm scripts and dependencies
• Build Pattern: a pipeline that transforms src/ via multiple tasks (build‐assets, build-pug, build-scss, build-scripts) into dist/.
• Dev Server: npm start spins up live preview + watchers.
Inspect the README for Insights
• Confirms static site generator‐style build: authors edit src/, run npm scripts to produce dist/.
• Lists key npm scripts mapping to pipeline stages.
• No backend or database—purely client‐side.
Main Components and Their Relationships
a. Components:
1. Source Layer (src/)
2. Build Toolchain (scripts/ + npm)
3. Output Layer (dist/)
4. Development Server & Watcher (npm start)
5. External Tools/Libraries (Node.js, NPM, Pug, Sass, Bootstrap)
b. Data Flows:
– Pug templates → HTML (build‐pug)
– SCSS → CSS (build‐scss)
– JS source → bundled JS (build‐scripts)
– Static assets copied (build‐assets)
– All outputs → dist/
– Dev Server reads dist/, serves to browser, watches src/ for changes → triggers rebuild steps → live‐reload browser
c. Architectural Patterns:
– Static‐site generator pipeline
– Clear separation of concerns: templating, styling, scripting, assets
– Task‐based build system
d. Technologies & Frameworks:
– Node.js & npm as orchestrator
– Pug (templating)
– Sass/SCSS (styling)
– Bootstrap (UI framework)
– Plain JavaScript + any browser APIs
– Optional live‐reload tool (Browsersync or custom watcher)
Key Details to Capture
• The separation between author‐facing src/ and deployable dist/.
• The role of the scripts/ folder as the customizable build pipeline.
• The live‐reload dev server’s loop between dist and src.
• External dependencies like Node/npm, Pug, Sass, and Bootstrap.