mirror of
https://github.com/andrewgioia/keyrune.git
synced 2024-11-05 08:34:45 +00:00
Formatting changes to gulpfile.js.
This commit is contained in:
parent
9feb5aafed
commit
fb8dbeed3d
67
gulpfile.js
67
gulpfile.js
@ -1,6 +1,9 @@
|
||||
// gulpfile.js
|
||||
|
||||
// Dependencies =================================
|
||||
/*
|
||||
* Dependencies =================================
|
||||
* | uses/functions of each are provided indiviudally.
|
||||
*/
|
||||
var gulp = require('gulp'), // task runner/manager (even tho this is a small project, it's still nice to have)
|
||||
sass = require('gulp-sass'), // compiles sass for us
|
||||
notify = require('gulp-notify'), // notifies us when a gulp task is completed through a system notifcation
|
||||
@ -11,18 +14,26 @@ var gulp = require('gulp'), // task runner/manager (even
|
||||
runseq = require('run-sequence'), // runs a sequence of gulp tasks. this is used because gulp.run is deprecated.
|
||||
del = require('del'); // del is used to cleanup cache and build files.
|
||||
|
||||
// Variables ====================================
|
||||
// silly, long, reused paths/dirs go here.
|
||||
/*
|
||||
* Variables ====================================
|
||||
* | silly, long, reused paths/dirs go here if needed.
|
||||
*/
|
||||
|
||||
// Gulp Tasks ===================================
|
||||
/*
|
||||
* Gulp Tasks ===================================
|
||||
* | All gulp tasks will be written/explained here.
|
||||
*/
|
||||
|
||||
// Build CSS task ----------------------------
|
||||
// Compiles scss into css,
|
||||
// autoprefix necessary css attributes/values,
|
||||
// minify prefixed css,
|
||||
// rename minified file with a '.min' suffix,
|
||||
// place into ./css directory
|
||||
//
|
||||
/*
|
||||
* Build CSS Task -------------------------------
|
||||
* | $ gulp build
|
||||
* |
|
||||
* | compiles scss into css,
|
||||
* | autoprefix necessary css attributes/values,
|
||||
* | minify prefixed css,
|
||||
* | rename minified file with a '.min' suffix,
|
||||
* | place into ./css directory
|
||||
*/
|
||||
gulp.task('build', function() {
|
||||
return gulp.src('./sass/**/*.scss')
|
||||
.pipe(sass())
|
||||
@ -34,27 +45,31 @@ gulp.task('build', function() {
|
||||
.pipe(notify({ onLast: true, message: 'build task complete' }));
|
||||
});
|
||||
|
||||
// Clean task -----------------------------------
|
||||
// Ensures that all artifacts/remnants of previous build are gone.
|
||||
//
|
||||
// $ gulp clean
|
||||
/*
|
||||
* Clean Task -----------------------------------
|
||||
* | $ gulp clean
|
||||
* |
|
||||
* | Ensures that all artifacts/remnants of previous build are gone.
|
||||
*/
|
||||
gulp.task('clean', function() {
|
||||
return del(['./css/**/*.*']);
|
||||
});
|
||||
|
||||
// Watch task -----------------------------------
|
||||
// Great for automating compilation during develpoment.
|
||||
//
|
||||
// $ gulp watch
|
||||
/*
|
||||
* Watch Task -----------------------------------
|
||||
* | $ gulp watch
|
||||
* |
|
||||
* | Great for automating compilation during develpoment.
|
||||
*/
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch('./sass/**/*.scss', ['clean', 'build']);
|
||||
});
|
||||
|
||||
// Default task ---------------------------------
|
||||
// Runs the watch task as a task dependency by default.
|
||||
// To execute this command use one of the following commands
|
||||
// from within the project root.
|
||||
//
|
||||
// $ gulp
|
||||
// $ gulp default
|
||||
/*
|
||||
* Default Task ---------------------------------
|
||||
* | $ gulp
|
||||
* | $ gulp default
|
||||
* |
|
||||
* | Runs the watch task as a task dependency by default.
|
||||
*/
|
||||
gulp.task('default', ['watch']);
|
||||
|
Loading…
Reference in New Issue
Block a user