chore(tooling): Fix for jade shredding thrashing

closes #731
This commit is contained in:
Jay Traband 2016-01-20 11:59:40 -08:00 committed by Ward Bell
parent c4ae1f1b1b
commit 59204bfbc8
2 changed files with 8 additions and 7 deletions

View File

@ -627,10 +627,10 @@ function devGuideExamplesWatch(shredOptions, postShredAction) {
function devGuideSharedJadeWatch(shredOptions, postShredAction) {
var includePattern = path.join(DOCS_PATH, '**/*.jade');
var excludePattern = '!' + path.join(shredOptions.jadeDir, '**/node_modules/**/*.*');
// removed this version because gulp.watch has the same glob issue that dgeni has.
// var excludePattern = '!' + path.join(shredOptions.jadeDir, '**/node_modules/**/*.*');
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**']});
var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/_.*.jade']});
gulp.watch([files], {readDelay: 500}, function (event, done) {
gutil.log('Dev Guide jade file changed')
gutil.log('Event type: ' + event.type); // added, changed, or deleted

View File

@ -53,11 +53,12 @@ var shredSingleJadeDir = function(shredOptions, filePath) {
includeSubdirs: false,
jadeDir: jadeDir
}
var cleanPath = path.join(jadeDir, '_.*.jade')
return delPromise([ cleanPath]).then(function(paths) {
console.log('Deleted files/folders:\n', paths.join('\n'));
return shred(options);
});
// var cleanPath = path.join(jadeDir, '_.*.jade')
//return delPromise([ cleanPath]).then(function(paths) {
// console.log('Deleted files/folders:\n', paths.join('\n'));
// return shred(options);
//});
return shred(options);
}
var buildShredMap = function(shredMapOptions) {