PiruBoilerplatePug is a lightweight framework for creating static HTML templates efficiently.
- Utilizes Webpack 5 for streamlined task automation.
- Built on the foundation of Sass and Pug (formerly Jade).
- Compiles Pug templates and updates the browser on every change.
- Detects errors in Sass, Pug, and JavaScript, preventing Webpack crashes.
- Generates source maps for compiled files.
- Fork and clone this repository or download it as a ZIP archive.
- Run
npm install
(ensure you have an updated npm version and Node.js 6 or higher). - Execute
npm run build
to compile files for production. - Use
npm run dev
to compile files for development. - Utilize
npm run watch
to automatically compile changes. - Start a local server and see instant changes with
npm start
. - Enjoy a streamlined workflow!
- The src folder contains the directory structure for your work.
- The public folder holds the compiled files ready for production.
- Import your Sass partials in
app.scss
; their order is specified in the file. - For Pug, the
pages
directory includes project pages, andincludes
contains reusable components. - In the case of JavaScript, the
modules
folder encompasses importable modules inapp.js
.
├───📁 src/
│ ├───📁 fonts/
│ │ └───📄 piru.ttf
│ ├───📁 img/
│ │ ├───📄 logo.png
│ │ └───📄 piru.jpg
│ ├───📁 js/
│ │ ├───📁 modulos/
│ │ │ ├───📄 bootstrap.js
│ │ │ └───📄 feathericons.js
│ │ └───📄 app.js
│ ├───📁 pug/
│ │ ├───📁 includes/
│ │ │ ├───📄 footer.pug
│ │ │ ├───📄 header.pug
│ │ │ ├───📄 layout.pug
│ │ │ ├───📄 navbar.pug
│ │ │ └───📄 sidebar.pug
│ │ └───📁 pages/
│ │ ├───📄 index.pug
│ │ └───📄 post.pug
│ └───📁 scss/
│ ├───📁 base/
│ │ ├───📄 _reset.scss
│ │ └───📄 _typografi.scss
│ ├───📁 components/
│ │ ├───📄 _button.scss
│ │ └───📄 _card.scss
│ ├───📁 config/
│ │ ├───📄 _functions.scss
│ │ ├───📄 _mixins.scss
│ │ └───📄 _variables.scss
│ ├───📁 hacks/
│ │ └───📄 _hack.scss
│ ├───📁 layout/
│ │ ├───📄 _footer.scss
│ │ ├───📄 _header.scss
│ │ └───📄 _wrapper.scss
│ ├───📁 themes/
│ │ ├───📄 _dark.scss
│ │ └───📄 _light.scss
│ ├───📁 vendors/
│ │ └───📄 _vendors.scss
│ └───📄 app.scss
├───📄 .babelrc
├───📄 .editorconfig
├───📄 package-lock.json
├───📄 package.json
├───📄 postcss.config.js
├───📄 README.md
└───📄 webpack.config.js