logo
down
shadow

Multiple synchronous streams in one Gulp task?


Multiple synchronous streams in one Gulp task?

By : Syed Wajid Ali
Date : November 22 2020, 10:33 AM
To fix the issue you can do The recommended way to use multiple pipelines in a gulp task is by using merge-stream:
code :
var merge = require('merge-stream');

gulp.task('anothertask', function(){
  var stream1 = gulp.src('file1.css')
    .pipe(dosomething())
    .pipe(gulp.dest('./css'));

  var stream2 = gulp.src('file2.css')
    .pipe(dosomethingElse())
    .pipe(gulp.dest('./css'));

  return merge(stream1, stream2);
});


Share : facebook icon twitter icon
Gulp synchronous task issue

Gulp synchronous task issue


By : ian
Date : March 29 2020, 07:55 AM
With these it helps I think you are not defining the 'debugAll' task right. Try like this:
code :
gulp.task('debugAll', function () { 
    runSequence('debug', 'rename', 'final');
});
gulp.task('debug', function () {
    return gulp.src('client/*.html')
        .pipe(debug())
        .pipe(gulp.dest(path + '/Areas/WebAPI/Views/Shared'));
});
How to mark gulp task as completed when more than one gulp streams are being executed?

How to mark gulp task as completed when more than one gulp streams are being executed?


By : rajneesh
Date : March 29 2020, 07:55 AM
should help you out You can use merge-stream or event-stream packages. Here is example for merge-stream:
code :
var merge = require('merge-stream');
gulp.task('process-css-debug', function() {
     var first = gulp
        .src('src/**/app.scss')
        .pipe(gp.plumber())
        .pipe(gp.sass().on('error', gp.sass.logError))
        .pipe(gp.autoprefixer())
        .pipe(gp.rename('app.min.scss'))
        .pipe(gulp.dest('./app'));

     var second = gulp
        .src('src/**/app.inline.scss')
        .pipe(gp.plumber())
        .pipe(gp.sass().on('error', gp.sass.logError))
        .pipe(gp.autoprefixer())
        .pipe(gp.rename('app.inline.min.scss'))
        .pipe(gulp.dest('./app'));

     return merge(first, second);
});
Creating a single file from multiple streams while keeping the streams and files order with Gulp

Creating a single file from multiple streams while keeping the streams and files order with Gulp


By : Aklım Selim
Date : March 29 2020, 07:55 AM
like below fixes the issue I think streamqueue is what you're looking for:
code :
var streamqueue = require('streamqueue');

gulp.task('dist', function() {
  return streamqueue({ objectMode: true },
    gulp.src(['**/[^_]*.js', '!**/_*/**'], { cwd: 'js' }),
    gulp.src(['**/[^_]*.html', '!**/_*/**'], { cwd: 'views' })
      .pipe(compile_views())
  )
  .pipe(concat('output.js'))
  .pipe(gulp.dest('dist'));
});
How to return all the streams at once from a gulp task with multiple source files?

How to return all the streams at once from a gulp task with multiple source files?


By : adu
Date : March 29 2020, 07:55 AM
Hope that helps OK, I just found a solution to this, and it's ridiculously simple: to use the task's callback argument like this:
code :
if (streams.length === taskNum) {
  gUtil.log('the end!');
  done();
}
Node/Gulp synchronous deletion of directory within task

Node/Gulp synchronous deletion of directory within task


By : Klaus Schlegel
Date : March 29 2020, 07:55 AM
I wish this helpful for you If you really want to delete the directory synchronously, you can just use fs directly:
Related Posts Related Posts :
  • Mocha JS: How to reuse assertions within a spec?
  • Is ember.js stable enough to use in a real world project?
  • jQuery Load() not loading within div
  • encode stream from webCam h264
  • Regex to find pattern, return subpattern
  • Why does this regex to remove empty <p></p> tags from a string fail?
  • Rails: pass data to javascript
  • Quickest way to check if a number is in a set?
  • Phonegap events online/offline not working
  • In HTML5, please explain the meaning of '?' in the statement
  • Form to use AJAX rather than a page refresh but also utilise error handling?
  • JQuery Script looping error
  • different size divs align top left
  • Image fade-in when webpage finishes loading
  • Seeking HTML5 audio element causes delay (breaks sync)
  • How can I read & write data to a new tab in Firefox?
  • jQuery or JS turn all words into italic type
  • iOS css -webkit-transform: scale doesn't offset touch events
  • Populate select list using javascript
  • Can you work out why my .js file doesn't seem to be linking to my html?
  • Make slideToggle effect only one element at a time
  • Output sound using JavaScript
  • What is the analytics.js equivalent of _trackPageview found in ga.js
  • How can I check if a JS file has been included already?
  • hasClass and condition not working
  • EDITED: I'm having issues with a button and its function
  • Importing XML in HTML with javascript
  • Create new function in contentScriptFile in Firefox extension
  • Should I build Node.js from source or download the OS X installer?
  • How to enforce integer sizes in JS? (TypeScript?)
  • How to update the JSON object without deleting old values using javascript
  • Reading a javascript variable containing a string into another file
  • Possible to prevent 403 errors from logging to the web console?
  • Jquery Accordion - Expand and collapse div on hover
  • jquery .hide() function - Hide mobile, Display Desktop
  • Holding password in javascript variable - security implications?
  • JQPlot trouble to render vertical stacked bar and horizontal legend
  • counts days inbetween then add class to those days with nested divs?
  • Marionette.js with Rails (Devise) Authentication
  • javascript anonymous function evaluation idiom
  • Why am I losing the decimal when working this equation in Javascript?
  • Site redirects to index.php after being open while making calls to an API using AJAX
  • How to determine when multiple callbacks are all done
  • How to update Yeoman dependencies?
  • How can I do a /resolve with the Soundcloud Javascript SDK?
  • I'm not able to call a named callback function
  • How to get value of Paragraph element contained in <div> in HTML using JavaScript
  • Javascript - Get value from textbox and save it on a string
  • Backbonejs collection not populated, but fetch works
  • when function's internal [[scope]] property is assigned?
  • Wrapping around the edges in a 2d array (game of life)?
  • Clone div with all nested elements along with events in pure javascript
  • How to get response text?
  • Setting and retrieving cookies in javascript
  • Passing parameter with double quotes
  • finding the meaning of the obfuscated javascript
  • Socket.io - Sending data from a pusher stream to the client
  • How to determine the visibility li's in a scrollable ul
  • How to create Scrolling Effect like Grouek website
  • How to display a state in parents template in ui-router
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org