Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fredoseiler's avatar

Elixir and gulp sourcemaps

With the sourcemaps support, gulp-notify is triggered twice in my less task.

Adding gulp-print just before the notification pipe shows me that gulp-notify is triggered first for the sourcemap then for the stylesheet :

Double notification

Is there a way to trigger the notifier only once at the end of the task ?

0 likes
2 replies
bashy's avatar

Tell me about it... I have four SASS files that Elixir compiles and I get notifications for each :P Jeffrey replied to it and said I should be only using one SASS file and import rest but I need them separate. Not sure it can be fixed.

1 like
fredoseiler's avatar
fredoseiler
OP
Best Answer
Level 23

I ended up commenting the success notification pipe and adding a finish task to my gulpfile.

If all the source files are in the same task, maybe there's a way to tweak before the notification pipe with gulp-filter / gulp-if / gulp-expect-file / gulp-give-me-only-the-last-item-in-my-batch. Something like :

.pipe(plugins.filter('whatever/last.css'))
.pipe(new Notification()...);

Another solution : cut off notifications, cry a little and move on.

Please or to participate in this conversation.