From 09d37fe72c956dd3da3d1b2ad936a17ce647b81d Mon Sep 17 00:00:00 2001 From: Geoffrey Pursell Date: Mon, 22 Feb 2016 09:34:56 -0600 Subject: [PATCH 1/2] quick fixups to gulpfile --- gulpfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index f8ad52f35..81e8d9b96 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -96,10 +96,10 @@ gulp.task('cp:css', function(){ // Styleguide Copy gulp.task('cp:styleguide', function(){ return gulp.src( - [ '**/*'], - {cwd: path.resolve(paths().source.styleguide)} ) + ['**/*'], + {cwd: path.resolve(paths().source.styleguide)}) .pipe(gulp.dest(path.resolve(paths().public.styleguide))) - .pipe(browserSync.stream());; + .pipe(browserSync.stream()); }); //server and watch tasks @@ -120,7 +120,7 @@ gulp.task('connect', ['lab'], function(){ path.resolve(paths().source.data, '*.json'), path.resolve(paths().source.fonts + '/*'), path.resolve(paths().source.images + '/*'), - path.resolve(paths().source.data + '*.json'), + path.resolve(paths().source.data + '*.json') ], ['lab-pipe'], function () { browserSync.reload(); } From 75ff18a01114636ff21b48f0c58a01f17d117e78 Mon Sep 17 00:00:00 2001 From: Geoffrey Pursell Date: Mon, 22 Feb 2016 09:36:26 -0600 Subject: [PATCH 2/2] exclude the UI chrome from browsersync snippet injection --- Gruntfile.js | 24 +++++++++++++++++++++++- gulpfile.js | 26 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 7b57f6385..06c6cf6d2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -101,6 +101,10 @@ module.exports = function(grunt) { ignoreInitial: true, ignored: '*.html' }, + snippetOptions: { + // Ignore all HTML files within the templates folder + blacklist: ['/index.html', '/'] + }, plugins: [ { module: 'bs-html-injector', @@ -108,7 +112,25 @@ module.exports = function(grunt) { files: [path.resolve(paths().public.root + '/index.html'), path.resolve(paths().public.styleguide + '/styleguide.html')] } } - ] + ], + notify: { + styles: [ + 'display: none', + 'padding: 15px', + 'font-family: sans-serif', + 'position: fixed', + 'font-size: 1em', + 'z-index: 9999', + 'bottom: 0px', + 'right: 0px', + 'border-top-left-radius: 5px', + 'background-color: #1B2032', + 'opacity: 0.4', + 'margin: 0', + 'color: white', + 'text-align: center' + ] + } } } }, diff --git a/gulpfile.js b/gulpfile.js index 81e8d9b96..a481efccd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -102,11 +102,33 @@ gulp.task('cp:styleguide', function(){ .pipe(browserSync.stream()); }); -//server and watch tasks -gulp.task('connect', ['lab'], function(){ +// server and watch tasks +gulp.task('connect', ['lab'], function () { browserSync.init({ server: { baseDir: path.resolve(paths().public.root) + }, + snippetOptions: { + // Ignore all HTML files within the templates folder + blacklist: ['/index.html', '/'] + }, + notify: { + styles: [ + 'display: none', + 'padding: 15px', + 'font-family: sans-serif', + 'position: fixed', + 'font-size: 1em', + 'z-index: 9999', + 'bottom: 0px', + 'right: 0px', + 'border-top-left-radius: 5px', + 'background-color: #1B2032', + 'opacity: 0.4', + 'margin: 0', + 'color: white', + 'text-align: center' + ] } }); gulp.watch(path.resolve(paths().source.css, '**/*.css'), ['cp:css']);