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

Replacing the unmaintained gulp-livereload with gulp-refresh #1552

Merged
merged 2 commits into from
Oct 11, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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",
Copy link
Member

@simison simison Oct 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~ instead of ^ ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

"gulp-rename": "~1.2.2",
"gulp-rev": "^7.1.2",
"gulp-sass": "~2.3.0",
Expand Down