Build, Serve and Watch: gulp
Running gulp
in the terminal or command line will compile the sources to dist
then start a local Browsersync instance on port 4001
to serve and refresh your pages as you edit.
The default task runs the following operations:
- clean: Gulp deletes the
dist
folder. All files indist
are erased. - html: All
.html
files are copied and.njk
files are compiled fromapp
todist
. - scss: Compiles
main.css
andsettings.css
fromapp/scss/
to thedist/css
along with appropriate.map
files. - copy-assets: Copies static files or assets from
app
todist
directory, such as fonts, images, plugins, javascript. - browserReload: Starts a Browsersync instance on port
4100
served fromdist
, defaults toindex.html
. - watchFiles: Monitors the following files and runs the corresponding tasks when anything is added, modified or deleted:
app/*.html
andapp/*.njk
, then runs the html task.app/scss/*.scss
, then runs the scss task.app/*.*
: then runs the copy-assets task.- After copying or replacing all new or modified assets or deleting the deleted ones, gulp runs the browserReload task.
- Continues watching for changes.