This will serve as a reference repository for common setup and tasks using Gulp taskrunner.
- Create package.json (using npm init generally)
- Install gulp locally and globally (npm i --save-dev gulp)
-
Create a src directory
- This is where all files that will be used for gulp will go
- A dist folder will be created for post-compilation output
- (src and dist are not required folder names)
- Create a gulpfile (gulpfile.js)
- Require gulp (const gulp = require('gulp');)
Follows structure of gulp.task(taskName: String, callback(){});
Run with gulp taskName
- gulp.task - Define tasks
- gulp.src - Point to files for use
- gulp.dest - Point to folder destination of post-compilation files
- gulp.watch - Watch files/folders for changes