Improve gulp task depdencies.

stable
Andrey Antukh 2014-09-10 13:24:20 +02:00
parent 14cbc30848
commit aa412445c0
1 changed files with 4 additions and 12 deletions

View File

@ -126,12 +126,7 @@ gulp.task "css", ->
.pipe(concat("vendor.css")) .pipe(concat("vendor.css"))
.pipe(gulp.dest(paths.distStylesPath)) .pipe(gulp.dest(paths.distStylesPath))
gulp.task "csslint-vendor", ["css"], -> gulp.task "csslint-app", ["sass"], ->
gulp.src(paths.css)
.pipe(csslint("csslintrc.json"))
.pipe(csslint.reporter())
gulp.task "csslint-app", ["css", "sass"], ->
gulp.src(paths.distStylesPath + "/app.css") gulp.src(paths.distStylesPath + "/app.css")
.pipe(csslint("csslintrc.json")) .pipe(csslint("csslintrc.json"))
.pipe(csslint.reporter()) .pipe(csslint.reporter())
@ -149,7 +144,7 @@ gulp.task "imagemin", ->
.pipe(imagemin({progressive: true})) .pipe(imagemin({progressive: true}))
.pipe(gulp.dest(paths.dist+"/images")) .pipe(gulp.dest(paths.dist+"/images"))
gulp.task "styles", ["css", "sass"], -> gulp.task "styles", ["css", "sass", "csslint-app"], ->
gulp.src(paths.distStyles) gulp.src(paths.distStyles)
.pipe(concat("main.css")) .pipe(concat("main.css"))
.pipe(gulp.dest(paths.distStylesPath)) .pipe(gulp.dest(paths.distStylesPath))
@ -227,20 +222,17 @@ gulp.task "express", ->
# Rerun the task when a file changes # Rerun the task when a file changes
gulp.task "watch", -> gulp.task "watch", ->
gulp.watch(paths.jade, ["jade_watch"]) gulp.watch(paths.jade, ["jade_watch"])
gulp.watch(paths.scssStyles, ["scsslint", "styles", "csslint-app"]) gulp.watch(paths.scssStyles, ["sass", "csslint-app", "styles"])
gulp.watch(paths.css, ["styles", "csslint-vendor"]) gulp.watch(paths.css, ["css", "styles"])
gulp.watch(paths.coffee, ["coffee"]) gulp.watch(paths.coffee, ["coffee"])
gulp.watch(paths.vendorJsLibs, ["jslibs"]) gulp.watch(paths.vendorJsLibs, ["jslibs"])
gulp.watch(paths.locales, ["locales"]) gulp.watch(paths.locales, ["locales"])
# The default task (called when you run gulp from cli) # The default task (called when you run gulp from cli)
gulp.task "default", [ gulp.task "default", [
"locales",
"jade", "jade",
"template", "template",
"styles", "styles",
"csslint-app",
"copy", "copy",
"coffee", "coffee",
"jslibs", "jslibs",