Created
June 23, 2014 11:11
-
-
Save MoOx/500286624c7c0490a798 to your computer and use it in GitHub Desktop.
My current gulpfile with watch inside
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp") | |
var server = require("./tasks/server") | |
gulp.task("clean", require("./tasks/clean")) | |
// generated assets | |
gulp.task("icons", require("./tasks/icons")) | |
gulp.task("scripts:linting", require("./tasks/scripts-linting")) | |
gulp.task("scripts", ["scripts:linting"], require("./tasks/scripts")) | |
gulp.task("styles", require("./tasks/styles")) | |
gulp.task("styles:all", ["icons"], require("./tasks/styles")) | |
// html & static | |
gulp.task("html", ["styles:all", "scripts"], require("./tasks/html")) | |
gulp.task("static", require("./tasks/static")) | |
// build | |
gulp.task("dist", [ | |
"clean", | |
"scripts", | |
"icons", | |
"styles:all", | |
"static", | |
"html" | |
]) | |
// dev tasks | |
gulp.task("server", ["dist"], server.start) | |
gulp.task("default", ["dist", "server", "watch"]) | |
gulp.task("test", ["dist"]) | |
gulp.task("watch", ["dist"], function() { | |
gulp.watch("./src/**/*.jade", ["html"]) | |
gulp.watch("./src/static/**/*", ["static"]) | |
gulp.watch("./src/**/*.css", ["styles"]) | |
gulp.watch("./src/icons/**/*", ["styles:all"]) | |
gulp.watch("./tasks/**/*.js", ["scripts:linting"]) | |
gulp.watch("./tests/**/*.js", ["scripts:linting"]) | |
gulp.watch("./dist/**/*").on("change", server.livereload) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment