This project is a simple boilerplate structure for generating static websites using Pug, Stylus, Babel, Gulp and Browsersync.
- HTML Template Engine: Pug
- CSS Preprocessor: Sass
- JS Transpiler: Babel
- Task Runner: Gulp
- Browser Testing Browsersync
First of all, you need NodeJS, GulpJS and Yarn to install the dependencies and run this project.
# after clone this repository, enter the directory
$ cd simple-boilerplate
# install dependencies
$ yarn
Now you are ready, just run yarn dev
to start a dev server.
When you are done, you can run yarn build
to genereate the minified files.
dev
: run the developer serverbuild
: run linters and build the production buildeslint
: run js and pug files linterstylelint
: run scss files linter
gulp
: run all tasks and initialize a server with live reloadgulp styles
: compile sass filesgulp scripts
: tranpile js filesgulp images
: compress images filesgulp vectors
: compress svg filesgulp pages
: compile pug filesgulp server
: inicialize a servergulp clear
: clear the dist foldergulp build
: generate the dist folder
.
├── src
│ ├── images
│ │ └── favicon.png
│ ├── pages
│ │ ├── layouts
│ │ │ └── default.pug
│ │ ├── partials
│ │ │ ├── footer.pug
│ │ │ ├── header.pug
│ │ │ └── main.pug
│ │ └── index.pug
│ ├── scripts
│ │ ├── hello.js
│ │ └── script.js
│ ├── styles
│ │ └── style.scss
│ └── vectors
│ └── simple.svg
├── .editorconfig
├── .eslintrc
├── .gitignore
├── .prettierrc
├── .stylelintrc
├── gulpfile.js
├── LICENSE
├── package.json
├── README.md
└── yarn.lock
This project uses Airbnb JavaScript Style Guide (but without the semicolons xD)
Thanks to @afonsopacifer and @willianjusten for the inspiration.
This boilerplate is free and open source software, distributed under the MIT License. So feel free to use this to create your site without linking back to me or using a disclaimer.