Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making it work with gulp-watch #19

Open
newtonianb opened this issue Jul 6, 2015 · 2 comments
Open

Making it work with gulp-watch #19

newtonianb opened this issue Jul 6, 2015 · 2 comments

Comments

@newtonianb
Copy link

Is this known to break with gulp-watch? It seems my changed file is not being picked up when I have the gulp-order hooked up. I'm also using it with gulp-cache and gulp-remember.

return gulp.src(conf.src)
        .pipe(coffeeFilter)
        .pipe($.cached('coffee'))
        .pipe($.coffee())
        .pipe($.remember('coffee'))
        .pipe(coffeeFilter.restore())
        .pipe($.order(castExtension(conf.src, ['coffee'], 'js'), { base: process.cwd() }))
        .pipe($.concat(conf.outputName))
        .pipe(gulp.dest(conf.dest))
@tarun29061990
Copy link

Does somebody had any luck on this??

@Wambosa
Copy link

Wambosa commented May 4, 2017

I just had to deal with this issue.

  1. using the relative path for so called optional base './' seems required
  2. using the built in gulp.watch beats out the gulp-watch plugin (more stable)
gulp.task('example', function() {
	return gulp.src(['lib/*', 'spec/*spec.js'])
		.pipe(order(['lib/dep.js', 'spec/*.js'], { base: './' }))
		.pipe(concat('combinedAndOrdered.js'))
		.pipe(gulp.dest('./.temp/'));
});

gulp.task('watch', function() {
  gulp.watch(['spec/*.js'], ['example']);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants