improve jade performance

stable
Juanfran 2014-08-12 09:49:25 +02:00
parent 290f5d8873
commit 53dded79b7
3 changed files with 25 additions and 20 deletions

View File

@ -20,6 +20,7 @@ connect = require("gulp-connect")
scsslint = require("gulp-scss-lint")
newer = require("gulp-newer")
cache = require("gulp-cached")
jadeInheritance = require('gulp-jade-inheritance')
paths = {
app: "app"
@ -76,17 +77,22 @@ paths = {
]
}
# Ordered list of vendor/external libraries.
##############################################################################
############################################################################
# Layout/CSS Related tasks
##############################################################################
gulp.task "jade", ->
gulp.src(paths.jade)
.pipe(plumber())
.pipe(cache("jade"))
.pipe(jade({pretty: true}))
.pipe(gulp.dest("#{paths.dist}/partials"))
gulp.task "jade_watch", ->
gulp.src(paths.jade)
.pipe(plumber())
.pipe(cache("jade"))
.pipe(jadeInheritance({basedir: './app/'}))
.pipe(jade({pretty: true}))
.pipe(gulp.dest("#{paths.dist}/partials"))
@ -211,7 +217,7 @@ gulp.task "express", ->
# Rerun the task when a file changes
gulp.task "watch", ->
gulp.watch(paths.jade, ["jade"])
gulp.watch(paths.jade, ["jade_watch"])
gulp.watch(paths.scssStyles, ["scsslint", "styles", "csslint-app"])
gulp.watch(paths.css, ["styles", "csslint-vendor"])
gulp.watch(paths.coffee, ["coffee"])

View File

@ -17,37 +17,36 @@
}
],
"devDependencies": {
"gulp": "^3.8.0",
"coffee-script": "^1.7.1",
"express": "^4.3.0",
"gulp-clean": "^0.2.4",
"gulp-coffee": "~1.4.1",
"gulp-coffeelint": "^0.2.2",
"gulp-concat": "^2.1.7",
"gulp-if": "0.0.5",
"gulp-plumber": "^0.5.6",
"gulp-rename": "^1.2.0",
"gulp-template": "^0.1.1",
"gulp-uglify": "~0.2.0",
"gulp-util": "~2.2.14",
"gulp-wrap": "^0.3.0",
"gulp": "^3.8.0",
"gulp-cached": "0.0.3",
"gulp-changed": "^0.4.0",
"gulp-clean": "^0.2.4",
"gulp-coffee": "~1.4.1",
"gulp-coffeelint": "^0.2.2",
"gulp-compass": "^1.1.9",
"gulp-concat": "^2.1.7",
"gulp-connect": "^2.0.5",
"gulp-csslint": "^0.1.3",
"gulp-filesize": "0.0.6",
"gulp-if": "0.0.5",
"gulp-imagemin": "^0.5.0",
"gulp-jade": "^0.5.0",
"gulp-jade-inheritance": "0.0.2",
"gulp-minify-css": "^0.3.1",
"gulp-minify-html": "^0.1.3",
"gulp-newer": "^0.3.0",
"gulp-notify": "^1.2.5",
"gulp-plumber": "^0.6.2",
"gulp-rename": "^1.2.0",
"gulp-ruby-sass": "^0.4.3",
"gulp-scss-lint": "0.1.0",
"gulp-styledocco": "0.0.1",
"gulp-watch": "^0.5.4"
"gulp-template": "^0.1.1",
"gulp-uglify": "~0.2.0",
"gulp-util": "~2.2.14",
"gulp-watch": "^0.5.4",
"gulp-wrap": "^0.3.0"
}
}