This project uses:
First of all, install the dependencies to run this boilerplate.
# Clone this repository
git clone git@github.com:ricardogouveia3/gulp-boilerplate.git
cd gulp-boilerplate
# install dependencies
npm install
After that, you should be good to go :)
├── assets/
│ ├── sass/
│ │ ├── partials/
│ │ │ └── _*.sass
│ │ └── style.sass
│ │ └── variables.sass
│ └── img/
│ └── *.{jpg||png||svg}
├── build/
│ ├── assets/
│ │ ├── css/
│ │ │ └── style.min.css
│ │ └── img/
│ │ └── *.min.{jpg||png||svg}
│ ├── js/
│ │ └── index.min.js
│ ├── *.html
│ └── favicon.ico
├── js/
│ └── *.js
├── pug/
│ └── *.pug
├── .editorconfig
├── .gitignore
├── gulpfile.js
├── package.json
└── README.md
These tasks are used for live reloading and debugging. They are time-saving focused. Don't use then for deploying.
-
gulp pugDev
: Compilespug/*.pug
into expandedbuild/*.html
files. They are acessible by the name of the file, eg:https://localhost:3000/page
for apage.pug
file. -
gulp sassDev
: Compilesstyle.sass
and its dependencies (assets/sass/**/*.sass
); concat result tobuild/css/style.min.css
(expanded style in this step). -
gulp jsDev
: Concatjs/*.js
intobuild/js/index.min.js
. -
gulp dev
: calls all Dev tasks
These tasks are used for building and deploying. They are performance and good practices focused. They may be too slow for live reloading (or may cause infinite looping tasks).
-
gulp pugBuild
: Compilespug/index.pug
intoindex.html
on root directory. -
gulp sassBuild
: Compilesassets/sass/style.sass
and its dependencies; autoprefix resulting css; concat result tobuild/css/style.min.css
. -
gulp jsBuild
: Concatjs/*.js
intobuild/js/index.min.js
. -
gulp imageBuild
: Optimize images (jpg, png, svg) fromassets/img
intobuild/assets/img
. -
gulp build
: Calls all Build tasks.
gulp watch
: Starts browsersync. Watch for chances in.pug
,.sass
and.js
files. Calls dev tasks individually.gulp browsersync
: Calls browsersync. Server/
isbuild/
.
gulp
: Calls watch. Used for dev stages.
MIT License © Ricardo Álvaro Gouveia Gomes Filho