Comments (6)
As far I can understand, you are looking for passThrough option:
// ...
.pipe(watch({
name: "Coffee",
passThrough: false
}))
// ...
from gulp-watch.
I believe that's still not it, I mean i've tried it and it still only outputs [gulp] Coffee saw main.coffee was changed
the first time I change the file. Every subsequent change doesn't show anything in terminal, although the file is compiled as expected.
from gulp-watch.
@floatdrop There is indeed such a behavior (highly undesired). The desired behavior is like here at the image on gulp-watch page but what being output to the console is just first time some watcher "saw somefile changed".
There is also no string like "Sass is watching 3 files", verbose: true
doesn't help either.
P.S. Watching behavior itself is correct though, so it's a matter of correct terminal output.
from gulp-watch.
@lmartins @VasilioRuzanni yeah, this is not what expected to be. I'm not quite sure about cause of this behavior, because logging code is really simple and should work - https://github.com/floatdrop/gulp-watch/blob/master/index.js#L63-L64
from gulp-watch.
Im closing as im not sure if what I was trying to achieve is expected behaviour.
But just to be clearer, my default approach is to have a task for compilation and another for watching, like this:
gulp.task('coffee', function () {
gulp.src( options.COFFEE.src )
.pipe(changed( options.COFFEE.build , { extension: '.js' }))
.pipe(coffeelint())
.pipe(coffeelint.reporter())
.pipe(coffee({
bare: true,
sourceMap: true
})
.on('error', gutil.log))
.pipe(gulp.dest( options.COFFEE.build ))
.pipe(connect.reload());
});
gulp.task('watch', function () {
gulp.watch( options.COFFEE.src , ['coffee']);
});
This does output information every time I change and save a file:
[gulp] Starting 'coffee'...
[gulp] Finished 'coffee' after 15 ms
I thought that by adding the pipe watch
in the coffee task itself would achieve the same result but that doesn't seem to be the case, again, this was just my assumption.
gulp.task('coffee', function () {
gulp.src( options.COFFEE.src )
.pipe(watch({
name: "Coffee"
}))
.pipe(changed( options.COFFEE.build , { extension: '.js' }))
.pipe(coffeelint())
.pipe(coffeelint.reporter())
.pipe(coffee({
bare: true,
sourceMap: true
})
.on('error', gutil.log))
.pipe(gulp.dest( options.COFFEE.build ))
.pipe(connect.reload());
});
from gulp-watch.
This issue is continued in #40
from gulp-watch.
Related Issues (20)
- Watched unexpected filepath
- Watched unexpected filepath
- Watched unexpected filepath
- Watched unexpected filepath
- subfolders no longer updating the main style.scss file
- Watched unexpected filepath
- How to deal with changed files? HOT 2
- watch is not working correctly
- chokidar version 3 HOT 4
- Watched unexpected filepath
- Watched unexpected filepath HOT 1
- please publish the latest version to npm
- chokidar version is too low
- Watched unexpected filepath
- Watched unexpected filepath HOT 1
- Watched unexpected filepath
- Watched unexpected filepath
- Watched unexpected filepath
- Watched unexpected filepath HOT 1
- Security Issue with Gulpwatch, fsevents and Request for Chokidar Version 3 and Fsevents Version 2 Installation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-watch.