chore(gulp): re-enable browsersync watching for non-API files
This commit is contained in:
parent
b82e229ade
commit
021c12d58a
18
gulpfile.js
18
gulpfile.js
|
@ -26,6 +26,7 @@ var TOOLS_PATH = './tools';
|
||||||
var ANGULAR_PROJECT_PATH = '../angular';
|
var ANGULAR_PROJECT_PATH = '../angular';
|
||||||
var PUBLIC_PATH = './public';
|
var PUBLIC_PATH = './public';
|
||||||
var DOCS_PATH = path.join(PUBLIC_PATH, 'docs');
|
var DOCS_PATH = path.join(PUBLIC_PATH, 'docs');
|
||||||
|
var NOT_API_DOCS_GLOB = path.join(PUBLIC_PATH, './{docs/*/latest/!(api),!(docs)}/**/*');
|
||||||
var RESOURCES_PATH = path.join(PUBLIC_PATH, 'resources');
|
var RESOURCES_PATH = path.join(PUBLIC_PATH, 'resources');
|
||||||
|
|
||||||
var docShredder = require(path.resolve(TOOLS_PATH, 'doc-shredder/doc-shredder'));
|
var docShredder = require(path.resolve(TOOLS_PATH, 'doc-shredder/doc-shredder'));
|
||||||
|
@ -67,16 +68,13 @@ gulp.task('serve-and-sync', ['build-docs'], function (cb) {
|
||||||
|
|
||||||
var browserSync = require('browser-sync').create();
|
var browserSync = require('browser-sync').create();
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
proxy: 'localhost:9000'
|
proxy: 'localhost:9000',
|
||||||
|
reloadDelay: 500
|
||||||
});
|
});
|
||||||
|
|
||||||
devGuideExamplesWatch(_devguideShredOptions, function() {
|
devGuideExamplesWatch(_devguideShredOptions, browserSync.reload);
|
||||||
browserSync.reload();
|
apiSourceWatch(browserSync.reload);
|
||||||
});
|
gulp.watch(NOT_API_DOCS_GLOB, browserSync.reload);
|
||||||
|
|
||||||
apiSourceWatch(function() {
|
|
||||||
browserSync.reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -86,10 +84,10 @@ gulp.task('build-and-serve', ['build-docs'], function (cb) {
|
||||||
var browserSync = require('browser-sync').create();
|
var browserSync = require('browser-sync').create();
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
proxy: 'localhost:9000',
|
proxy: 'localhost:9000',
|
||||||
files: [path.join(DOCS_PATH, '**/*/**/*')],
|
|
||||||
logFileChanges: true,
|
|
||||||
reloadDelay: 500
|
reloadDelay: 500
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.watch(NOT_API_DOCS_GLOB, browserSync.reload);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build-docs', ['_shred-devguide-examples', 'build-api-docs', '_zip-examples'], function() {
|
gulp.task('build-docs', ['_shred-devguide-examples', 'build-api-docs', '_zip-examples'], function() {
|
||||||
|
|
Loading…
Reference in New Issue