Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,36 @@ 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',
options: {
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'
]
}
}
}
},
Expand Down
34 changes: 28 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,39 @@ 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
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']);
Expand All @@ -120,7 +142,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(); }
Expand Down