How to use the stream-combiner2.obj function in stream-combiner2

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
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 og / gulp-book / demo / chapter7 / watchjs-1.js View on Github external
gulp.watch('src/js/**/*.js', function (event) {
        var paths = watchPath(event, 'src/', 'dist/')
        /*
        paths
            { srcPath: 'src/js/log.js',
              srcDir: 'src/js/',
              distPath: 'dist/js/log.js',
              distDir: 'dist/js/',
              srcFilename: 'log.js',
              distFilename: 'log.js' }
        */
        gutil.log(gutil.colors.green(event.type) + ' ' + paths.srcPath)
        gutil.log('Dist ' + paths.distPath)

        var combined = combiner.obj([
            gulp.src(paths.srcPath),
            uglify(),
            gulp.dest(paths.distDir)
        ])

        combined.on('error', handleError)
    })
})
github sophilabs / gilp / examples / full.js View on Github external
function py() {
  var src = filter(['app/**/*.py'], {restore: true});
  return combiner(
    src,
    print(),
    filenameHint({regExp: /(^|\/)[a-z_0-9]+\.py$/}),
    flake8('.flake8'),
    flake8.failOnError(),
    checkGrep(/datetime\.now\(\)/g, {message: 'Replace datetime.now by timezone.now'}),
    checkGrep(/gettext/g, {message: 'Remove i18n'}),
    checkGrep(/print\((.(?!noqa$))+$/gm, {message: 'print call'}),
    checkGrep.failOnError(),
    src.restore
  );
}
github predixdesignsystem / px-app-nav / gulpfile.js View on Github external
function buildCSS() {
  return combiner.obj([
    $.sass(sassOptions),
    $.autoprefixer({
      browsers: ['last 2 versions'],
      cascade: false,
      flexbox: false
    }),
    gulpif(!argv.debug, $.cssmin())
  ]).on('error', handleError);
}
github tradle / engine / lib / retrystream.js View on Github external
backoff.once('ready', loop)
            return backoff.backoff()
          }
        }

        const id = data[primaryKey]
        delete inProgress[id]
        cb(null, {
          input: data,
          output: val
        })
      })
    })()
  })

  const transform = combine.obj(
    registrar,
    processor
  )

  transform.on('pause', () => paused = true)
  transform.on('resume', () => paused = false)

  if (!transform.destroy) {
    transform.destroy = transform.end
  }

  return transform
}

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