From d28960c2deb6c00146eb9e2b6c96d2a10e2a4446 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 15 Sep 2014 07:21:41 +0200 Subject: [PATCH] fix jade compile --- gulpfile.coffee | 10 ++++++---- package.json | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 410624f8..7c1c5d42 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -26,7 +26,7 @@ paths = { app: "app" dist: "dist" html: "app/*.html" - jade: "app/partials/**/*.jade" + jade: ["app/index.jade", "app/partials/**/*.jade"] scssStyles: "app/styles/**/*.scss" distStylesPath: "dist/styles" distStyles: ["dist/styles/vendor.css", @@ -97,15 +97,16 @@ gulp.task "jade_watch", -> gulp.src(paths.jade) .pipe(plumber()) .pipe(cache("jade")) - .pipe(jadeInheritance({basedir: './app/'})) + .pipe(jadeInheritance({basedir: './app'})) .pipe(jade({pretty: true})) - .pipe(gulp.dest("#{paths.dist}/partials")) + .pipe(gulp.dest("#{paths.dist}")) + # .pipe(gulp.dest("#{paths.dist}/partials")) gulp.task "template", -> gulp.src("#{paths.app}/index.jade") .pipe(plumber()) .pipe(jade({pretty: true, locals:{v:(new Date()).getTime()}})) - .pipe(gulp.dest(paths.dist)) + .pipe(gulp.dest("#{paths.dist}")) gulp.task "scsslint", -> gulp.src([paths.scssStyles, '!app/styles/bourbon/**/*.scss']) @@ -222,6 +223,7 @@ gulp.task "express", -> # Rerun the task when a file changes gulp.task "watch", -> gulp.watch(paths.jade, ["jade_watch"]) + gulp.watch("#{paths.app}/index.jade", ["template"]) gulp.watch(paths.scssStyles, ["sass", "csslint-app", "styles"]) gulp.watch(paths.css, ["css", "styles"]) gulp.watch(paths.coffee, ["coffee"]) diff --git a/package.json b/package.json index 7181f147..d1f53fce 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "gulp-if": "0.0.5", "gulp-imagemin": "^0.5.0", "gulp-jade": "^0.5.0", - "gulp-jade-inheritance": "0.0.3", + "gulp-jade-inheritance": "0.0.4", "gulp-minify-css": "^0.3.1", "gulp-minify-html": "^0.1.3", "gulp-newer": "^0.3.0",