How to use stream-combiner2 - 10 common examples

To help you get started, we’ve selected a few stream-combiner2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JsAaron / xut.js / gulp-test / gulpfile.js View on Github external
gulp.task('style-sass', function() {

    // gulp.src('style/sass/index.scss')
    //    .pipe(plugins.sass())
    //    .pipe(plugins.autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
    //    .pipe(plugins.rename({
    //        suffix: '.min'
    //    }))
    //    .pipe(plugins.minifyCss())
    //    .pipe(gulp.dest('style/css'))
    //    .pipe(notify({
    //        message: 'Styles task complete'
    //    }));

    var combined = combiner.obj([
        gulp.src('style/sass/index.scss'),
        plugins.sass(),
        plugins.rename({
            suffix: '.min'
        }),
        plugins.minifyCss(),
        gulp.dest('style/css')
    ]);
    // 任何在上面的 stream 中发生的错误,都不会抛出,
    // 而是会被监听器捕获
    combined.on('error', console.error.bind(console));

    return combined;
});
github nimojs / gulp-watch-path / examples / gulpfile.js View on Github external
gulp.watch('src/**/*.js', function (event) {
        var paths = watchPath(event,'src/', 'dist/');
        /*
        paths {srcPath: 'src/file.js',
              srcDir: 'src/',
              distPath: 'dist/file.node',
              distDir: 'dist/',
              srcFilename: 'file.js',
              distFilename: 'file.js' }
        */
        var combined = combiner.obj([
            gulp.src(paths.srcPath), // src/file.js
            uglify(),
            gulp.dest(paths.distDir) // dist/
        ]);
        combined.on('error', function (err) {
            console.log('--------------')
            console.log('Error')
            console.log('fileName: ' + err.fileName)
            console.log('lineNumber: ' + err.lineNumber)
            console.log('message: ' + err.message)
            console.log('plugin: ' + err.plugin)
        })

        console.log('\n')
        console.log(event.type + ': ' + paths.srcPath)
        console.log('dist: ' + paths.distPath)
github cwadrupldijjit / ng2-parallax / gulpfile.js View on Github external
// copy
		gulp.src(pathToEs5)
			.pipe(gulp.dest(destinations.es5)),
		
		/* This task doesn't work for some reason, deriving from possibly not being able to
		   find the files, which doesn't make sense since the task above it works just fine. */
		// // minify
		// gulp.src(pathToEs5)
		// 	.pipe(uglify())
		// 	.pipe(rename({
		// 		suffix: '.min'
		// 	}))
		// 	.pipe(gulp.dest(outputDist_es5))
	]);
	
	combine.on('error', console.error.bind(console));
}
github cwadrupldijjit / ng2-parallax / gulpfile.js View on Github external
function copyToDist() {
	combine.obj([
		// ts
		// copy
		tsTranspileSystem(),
		
		// minify System
		gulp.src(pathToTs)
			.pipe(tsc(tsconfig_system))
			.pipe(uglify())
			.pipe(rename({
				suffix: '.min'
			}))
			.pipe(gulp.dest(destinations.system)),
		
		tsTranspileCommonJs(),
		
		// minify commonjs
github SamyPesse / gitkit-js / src / transfer / uploadPacks.js View on Github external
function createUploadPackParser(opts): WritableStream {
    return combine.obj(
        // Parse as lines
        createPackLineParser(),
        // Parse metatdata of lines
        createPackLineMetaParser(),
        // Filter packs
        es.map((line, callback) => {
            if (line.type == LINEMETA_TYPES.PACKFILE) {
                callback(null, line);
            } else {
                callback();
            }
        }),
        // Parse pack as objects
        parsePack(opts)
    );
}
github charleslbryant / hello-react-and-typescript / gulpfile.js View on Github external
gulp.task('html', function(done){
    combiner.obj([
        gulp.src(config.paths.html)
        .pipe(gulp.dest(config.paths.dist))
        .pipe(connect.reload())
    ])
    .on('error', console.error.bind(console));
    done();
});
github typographist / postcss / gulpfile.js / tasks / styles.js View on Github external
gulp.task('styles', () =>
  combine(
    gulp.src(paths.src.styles.entry),
    $.if(IS_DEVELOPMENT, $.sourcemaps.init()),
    $.sass(),
    $.if(IS_DEVELOPMENT, $.sourcemaps.write()),
    $.if(IS_DEVELOPMENT, gulp.dest(paths.root.src)),
    $.if(!IS_DEVELOPMENT, gulp.dest(paths.root.dist)),
  ).on('error', $.notify.onError()),
);
github ninabreznik / voting-ethereum-contract / node_modules / module-deps / index.js View on Github external
function done () {
        var middle = combine.apply(null, streams);
        middle.on('error', function (err) {
            err.message += ' while parsing file: ' + file;
            if (!err.filename) err.filename = file;
            dup.emit('error', err);
        });
        input.pipe(middle).pipe(output);
    }
github browserify / module-deps / index.js View on Github external
function done () {
        var middle = combine.apply(null, streams);
        middle.on('error', function (err) {
            err.message += ' while parsing file: ' + file;
            if (!err.filename) err.filename = file;
            dup.emit('error', err);
        });
        input.pipe(middle).pipe(output);
    }
github alexpopdev / underscorejs-examples / advanced-topics-2 / gulp-browserify / node_modules / browserify / node_modules / module-deps / index.js View on Github external
function done () {
        var middle = combine.apply(null, streams);
        middle.on('error', function (err) {
            err.message += ' while parsing file: ' + file;
            if (!err.filename) err.filename = file;
            self.emit('error', err);
        });
        input.pipe(middle).pipe(output);
    }

stream-combiner2

This is a sequel to [stream-combiner](https://npmjs.org/package/stream-combiner) for streams3.

MIT
Latest version published 9 years ago

Package Health Score

65 / 100
Full package analysis

Similar packages