-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
Description
Here's what I tried:
gulp.task('build:lbServices', function() {
return gulp.src(sources.server)
.pipe(loopbackAngular())
.pipe(rename('lb-services.js'))
.pipe(gulp.dest('./client/js/services'));
});
gulp.task('dev', ['build'], function() {
// watch for js changes
gulp.watch(sources.serverJs, ['build:lbServices']).on('change', function(event) {
// Thought this will solve it, but it didn't
delete require.cache[event.path];
delete require.cache[path.resolve(sources.server)];
});
});
One way to fix this, is to just use the lb-ng command instead(or spawn another process to do this), which will also solve #3 and #9.