skrajewski / laravel-elixir-browserify

Laravel Elixir Browserify Extension
18 stars 8 forks source link

Watchify doesn't "watch" #25

Open Daveawb opened 9 years ago

Daveawb commented 9 years ago

Running watchify now does not run the watch task.

The watchify task runs the tasks to watch once but then does nothing as it does not actually run the watch task, hence none of the watchers are invoked.

gulp.task('watchify', function() {
    config.useWatchify = true;

    srcPaths = config.watchers.default;
    tasksToRun = _.intersection(config.tasks, _.keys(srcPaths).concat('copy'));

    inSequence.apply(this, tasksToRun.concat('watch-assets'));
});

In my original PR, watchify depended on watch for this reason.

gulp.task('watchify', ['watch'], function() { ... });
igorsantos07 commented 8 years ago

Using mix.browserify('xxx', 'main.js') and running gulp watch does what you said: it only compiles once. Is this related?