var browser = require('browser-sync');
// Runs unit tests
-gulp.task('test', ['build', 'test:sass', 'test:javascript'], function() {
+gulp.task('test', ['sass:foundation', 'javascript:foundation', 'test:sass', 'test:javascript', 'watch'], function() {
browser.init({ server: 'test/visual' });
gulp.watch(['scss/**/*', 'js/**/*', 'test/visual/**/*'], ['test:reload']);
});
browser.init({server: './_build', port: port});
});
-// Runs all of the above tasks and then waits for files to change
-gulp.task('default', ['serve'], function() {
+// Watch files for changes
+gulp.task('watch', function() {
gulp.watch('docs/**/*', ['docs', browser.reload]);
gulp.watch(['docs/layout/*.html', 'docs/partials/*.html'], ['docs:all', browser.reload]);
gulp.watch('scss/**/*', ['sass', browser.reload]);
gulp.watch('js/**/*', ['javascript:foundation', browser.reload]);
gulp.watch('docs/assets/js/**/*', ['javascript:docs', browser.reload]);
});
+
+// Runs all of the above tasks and then waits for files to change
+gulp.task('default', ['serve', 'watch']);