Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
feat(build): add CSS injecting
Browse files Browse the repository at this point in the history
  • Loading branch information
gheoan committed Nov 30, 2015
1 parent 358c2c1 commit fb620e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build/tasks/build.js
Expand Up @@ -8,6 +8,7 @@ var paths = require('../paths');
var compilerOptions = require('../babel-options');
var assign = Object.assign || require('object.assign');
var notify = require("gulp-notify");
var browserSync = require('browser-sync');

// transpiles changed es6 files to SystemJS format
// the plumber() call prevents 'pipe breaking' caused
Expand All @@ -34,7 +35,8 @@ gulp.task('build-html', function() {
gulp.task('build-css', function() {
return gulp.src(paths.css)
.pipe(changed(paths.output, {extension: '.css'}))
.pipe(gulp.dest(paths.output));
.pipe(gulp.dest(paths.output))
.pipe(browserSync.stream());
});

// this task calls the clean task (located
Expand Down
5 changes: 4 additions & 1 deletion build/tasks/watch.js
Expand Up @@ -15,5 +15,8 @@ gulp.task('watch', ['serve'], function() {
gulp.watch(paths.source, ['build-system', browserSync.reload]).on('change', reportChange);
gulp.watch(paths.html, ['build-html', browserSync.reload]).on('change', reportChange);
gulp.watch(paths.css, ['build-css', browserSync.reload]).on('change', reportChange);
gulp.watch(paths.style, browserSync.reload).on('change', reportChange);
gulp.watch(paths.style, function() {
return gulp.src(paths.style)
.pipe(browserSync.stream());
}).on('change', reportChange);
});
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -27,7 +27,7 @@
"aurelia-tools": "^0.1.3",
"babel": "^5.8.23",
"babel-eslint": "^4.1.3",
"browser-sync": "^1.8.1",
"browser-sync": "^2.10.0",
"conventional-changelog": "0.0.11",
"del": "^1.1.0",
"gulp": "^3.8.10",
Expand Down

0 comments on commit fb620e7

Please sign in to comment.