Sample code for the book "5 Simple Steps Fast Reads: Build Tools" by Gavin Davies.
This repository is an example project showing how a build file might be written.
This project has two key files:
Gulpfile.js
- build file for the Gulp build toolGruntfile.js
- build file for the Grunt build tool
You will need:
- NodeJS with NPM installed
You will also need to install either Grunt or Gulp, depending on which one you want to use - you can install both if you like, but you should only use one per project.
# If you are using Grunt:
npm install --global grunt-cli
# If you are using Gulp:
npm install --global gulp
Clone this repository to a directory on your computer. Then, install the dependencies with:
npm install
Running it once:
gulp
Running it in "watch" mode, with a local webserver on http://localhost:3003/ :
gulp dev
grunt
Running it in "watch" mode, with a local webserver on http://localhost:3004/ :
grunt dev
Install LiveReload for Chrome. Both Grunt and Gulp build files have live reload configured so you can make changes and the browser will refresh automatically whenever you change anything.
This repository is designed as a companion to the short book "5 Simple Steps Fast Reads: Build Tools" by Gavin Davies which is available for the price of a cup of coffee!