javascript - Gulp. Compile all .jade files when child (_*.jade) included -
i have next structure:
jade ├── _skeleton.jade ├── _header.jade ├── _footer.jade | ├── includes │ └── _include-on-index.jade │ └── _include-on-page-1.jade │ └── _include-on-all-pages.jade | ├── pages │ └── index.jade │ └── page-1.jade │ └── page-2.jade │ └── page-3.jade
and need setup jade compile, apps, (for example prepros).
it means if edit page-3.jade need compile page-3.jade, if edit file start _.jade, don`t need compile exectly _.jade file html, need compile .jade files included _*.jade file
for example when edit file _header.jade, need compile files included _header.jade, if edit _include-on-index.jade need compile file without _ included _include-on-index.jade
i`m trying module gulp-jade-find-affected, works incorrect, , compile files start _*.jade html.
here gulpfile.js:
var gulp = require('gulp'), jade = require('gulp-jade'), watch = require('gulp-watch'), affected = require('gulp-jade-find-affected'); gulp.task('watch-jade', function () { '!sources/jade/_*.jade' watch('sources/jade/*.jade') .pipe(affected()) .pipe(jade()) .pipe(gulp.dest('site')); }); gulp.task('default', ['watch-jade']);
maybe have gulp task , can me ?
Comments
Post a Comment