Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
feat(gulp): replacing the unmaintained gulp-livereload with gulp-refresh
Browse files Browse the repository at this point in the history
* feat(gulp): replacing the unmaintained gulp-livereload with gulp-refresh
Replacing the unmaintained gulp-livereload with gulp-refresh (#1552)

* ~ instead of ^ for gulp-refresh package
  • Loading branch information
lirantal authored Oct 11, 2016
1 parent 0ea8cec commit 119753f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,29 @@ gulp.task('nodemon-debug', function () {
// Watch Files For Changes
gulp.task('watch', function () {
// Start livereload
plugins.livereload.listen();
plugins.refresh.listen();

// Add watch rules
gulp.watch(defaultAssets.server.views).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.server.allJS, ['eslint']).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.client.js, ['eslint']).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.client.css, ['csslint']).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.client.sass, ['sass', 'csslint']).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.client.less, ['less', 'csslint']).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.server.views).on('change', plugins.refresh.changed);
gulp.watch(defaultAssets.server.allJS, ['eslint']).on('change', plugins.refresh.changed);
gulp.watch(defaultAssets.client.js, ['eslint']).on('change', plugins.refresh.changed);
gulp.watch(defaultAssets.client.css, ['csslint']).on('change', plugins.refresh.changed);
gulp.watch(defaultAssets.client.sass, ['sass', 'csslint']).on('change', plugins.refresh.changed);
gulp.watch(defaultAssets.client.less, ['less', 'csslint']).on('change', plugins.refresh.changed);

if (process.env.NODE_ENV === 'production') {
gulp.watch(defaultAssets.server.gulpConfig, ['templatecache', 'eslint']);
gulp.watch(defaultAssets.client.views, ['templatecache']).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.client.views, ['templatecache']).on('change', plugins.refresh.changed);
} else {
gulp.watch(defaultAssets.server.gulpConfig, ['eslint']);
gulp.watch(defaultAssets.client.views).on('change', plugins.livereload.changed);
gulp.watch(defaultAssets.client.views).on('change', plugins.refresh.changed);
}
});

// Watch server test files
gulp.task('watch:server:run-tests', function () {
// Start livereload
plugins.livereload.listen();
plugins.refresh.listen();

// Add Server Test file rules
gulp.watch([testAssets.tests.server, defaultAssets.server.allJS], ['test:server']).on('change', function (file) {
Expand All @@ -125,7 +125,7 @@ gulp.task('watch:server:run-tests', function () {
});
});

plugins.livereload.changed();
plugins.refresh.changed();
});
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@
"gulp-imagemin": "~3.0.3",
"gulp-istanbul": "~1.1.1",
"gulp-less": "~3.1.0",
"gulp-livereload": "~3.8.1",
"gulp-load-plugins": "~1.3.0",
"gulp-mocha": "~3.0.1",
"gulp-ng-annotate": "~2.0.0",
"gulp-node-inspector": "~0.1.0",
"gulp-nodemon": "~2.2.1",
"gulp-protractor": "~3.0.0",
"gulp-refresh": "~1.1.0",
"gulp-rename": "~1.2.2",
"gulp-rev": "^7.1.2",
"gulp-sass": "~2.3.0",
Expand Down

0 comments on commit 119753f

Please sign in to comment.