self.queue.pop(); }) .on('redirect', function (new_url) { if (self.opts.log === true) { self.command.log('[redirect] ' +
.on('redirect', function (href) { extend(location, URL.parse(URL.resolve(location.href, href))); });
stream.on('data',function(buffer){ var part = buffer.toString(); string += part; });
stream.on('end',function(){ console.log('final output ' + string); });
busboy.on('file', (field, file, name, encoding, mime) => { }); file.on('limit', () => { debugLog(options, `Size limit reached for ${field}->${filename}, bytes:${getFileSize()}`); file.on('data', (data) => { uploadTimer.set(); // Refresh upload timer each time new data chunk came. file.on('end', () => { const size = getFileSize(); }); file.on('error', (err) => {
gulp.task('build-analytics-module', ['build-deploy-module'], function() { return browserify({ 'entries': buildConfig.sourceFiles.analytics, 'debug': false, 'transform': [babelify] }).bundle() .on("error", function(err) { console.log("Error : " + err.message); }) .pipe(fs.createWriteStream(buildConfig.dist + "/analytics.js")); });
function bundle() { gutil.log('Compiling JS...'); return bundler.bundle() .on('error', function (err) { gutil.log(err.message); browserSync.notify("Browserify Error!"); this.emit("end"); }) .pipe(source(config.js.dist.filename)) .pipe(gulp.dest(config.js.dist.path)) .pipe(reload({stream: true, once: true})); }
it('#5 big number file, autoNext=false', function (done) { let counter = 0; const s = stream.readLine(fs.createReadStream(path.resolve(__dirname, 'files/number_big.txt'))); s.on('data', function (data) { counter++; s.next(); }); s.on('end', function () { counter.should.equal(1000000); done(); }); });
gulp.task('js', function(){ browserify(config.paths.mainJS) .transform(reactify) .bundle() .on('error', console.error.bind(console)) .pipe(source('bundle.js')) .pipe(gulp.dest(config.paths.dist + '/scripts')) .pipe(connect.reload()); });
function bundle() { return bundler .bundle() .on('error', notify) .pipe(source('main.js')) .pipe(gulp.dest('./')) }