Skip to content

Commit

Permalink
Technically working livereload, but is slow and crashes browser #4
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisnyman committed Feb 6, 2015
1 parent ddc1e23 commit b5fd67f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
var gulp = require('gulp');
var csslint = require('gulp-csslint');
var livereload = require('gulp-livereload');

// Config
var cssfiles = ['../core/modules/**/*.css', '../core/themes/**/*.css', '/../core/misc/**/*.css'];

gulp.task('csslint', function() {
Expand All @@ -9,5 +11,15 @@ gulp.task('csslint', function() {
.pipe(csslint.reporter());
});

gulp.task('watch', function() {
livereload.listen();
gulp.watch(cssfiles, ['reloadcss']);
});

gulp.task('reloadcss', function(vinyl) {
gulp.src(cssfiles)
.pipe(livereload());
});

gulp.task('default', function () {
});
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
},
"devDependencies": {
"gulp": "^3.8.10",
"gulp-csslint": "^0.1.5"
"gulp-csslint": "^0.1.5",
"gulp-livereload": "^3.7.0",
"gulp-newer": "^0.5.0"
}
}

0 comments on commit b5fd67f

Please sign in to comment.