How to use the merge-stream function in merge-stream

To help you get started, we’ve selected a few merge-stream 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 OnsenUI / OnsenUI / bindings / vue / gulpfile.babel.js View on Github external
function vueBindingsEsm() {
  const babelrc = Object.assign({}, corePkg.babel);
  babelrc.babelrc = babelrc.presets[0][1].modules = false;
  babelrc.plugins = [
    'external-helpers',
    'transform-runtime',
  ];

  // ES Modules (transpiled ES source codes)
  return mergeStream(
    gulp.src([
      'src/**/*.js',
      '!src/*.js',
    ])
    .pipe($.babel(babelrc))
    .pipe(gulp.dest('esm/')),

    // Compile Vue components
    gulp.src([
      'src/**/*.vue',
    ])
    .pipe($.vueCompiler({
      babel: babelrc,
      newExtension: 'js',
    }))
    .pipe(gulp.dest('esm/'))
github Monofony / Monofony / assets / backend / gulpfile.babel.js View on Github external
export const buildAdminCss = function buildAdminCss() {
  const copyStream = merge(
    gulp.src(upath.joinSafe(nodeModulesPath, 'semantic-ui-css/themes/**/*'))
      .pipe(gulp.dest(upath.joinSafe(adminRootPath, 'css/themes'))),
  );

  const cssStream = gulp.src(paths.admin.css, { base: './' })
    .pipe(gulpif(options.sourcemaps, sourcemaps.init()))
    .pipe(concat('css-files.css'));

  const sassStream = gulp.src(paths.admin.sass, { base: './' })
    .pipe(gulpif(options.sourcemaps, sourcemaps.init()))
    .pipe(sass())
    .pipe(concat('sass-files.scss'));

  return merge(
    copyStream,
    merge(cssStream, sassStream)
github firekylin / firekylin / gulpfile.babel.js View on Github external
.pipe($.sass({ sourceComments: true, includePaths: ['www/static/css/common', 'node_modules'] }).on('error', $.sass.logError))
      .pipe($.autoprefixer({browsers: AUTOPREFIXER_BROWSERS.slice(0, 1)}))
      .pipe($.concat(dist))
      .pipe(gulp.dest('.tmp'))
      .pipe($.sourcemaps.write('.', {includeContent: true, sourceRoot: '/static/css/admin'}))
      .pipe(gulp.dest(webDist))
      .pipe($.size({title: 'web styles'}))
      : src
      .pipe($.sass({ outputStyle: 'compressed', includePaths: ['www/static/css/common', 'node_modules'] }).on('error', $.sass.logError))
      .pipe($.autoprefixer({browsers: AUTOPREFIXER_BROWSERS}))
      .pipe($.concat(dist))
      .pipe(gulp.dest(webDist))
      .pipe($.size({title: 'web styles'}));
  }

  return merge(
    compile(gulp.src(['www/static/css/admin/**/*.{css,scss}']), 'admin.css'),
    compile(gulp.src(['www/static/css/web/**/*.{css,scss}']), 'web.css')
  );
});
github honestbleeps / Reddit-Enhancement-Suite / gulpfile.babel.js View on Github external
gulp.task('zip', () =>
	merge(
		globby.sync(['dist/*', '!dist/zip']).map(dir =>
			gulp.src(path.join(dir, '**/*'))
				.pipe(zip(`${path.basename(dir)}.zip`))
				.pipe(gulp.dest('dist/zip'))
		)
	)
);
github pivotal-cf / pivotal-ui / tasks / css-components.js View on Github external
gulp.task('css-build-variables-and-mixins-package', function() {
  return mergeStream(
    gulp.src(['src/pivotal-ui/components/pui-variables.scss', 'src/pivotal-ui/components/mixins.scss']),
    gulp.src(['PUI_VARIABLES_AND_MIXINS_README.md'])
      .pipe(plugins.rename({basename: 'README'})),
    plugins.file('package.json', JSON.stringify({
      name: 'pui-css-variables-and-mixins',
      version: require('../package.json').version,
      repository: {
        type: 'git',
        url: 'https://github.com/pivotal-cf/pivotal-ui.git'
      },
      keywords: [
        'pivotal ui',
        'pivotal ui modularized'
      ],
      author: 'Pivotal Software, Inc',
      bugs: {
github Wolox / frontend-bootstrap / gulp / tasks / s3.js View on Github external
const publisher = awspublish.create(awsConf.keys);

  const unrevisionedHeaders = {
    ...awsConf.headers,
    'Cache-Control': 'max-age=0;smax-age=0;must-revalidate;'
  };

  const versioned = gulp.src(['./build/**/*', '!./build/index.html'])
    .pipe(awspublish.gzip({ ext: '' }))
    .pipe(parallelize(publisher.publish(awsConf.headers), 100));

  const unversioned = gulp.src('./build/index.html')
    .pipe(awspublish.gzip({ ext: '' }))
    .pipe(parallelize(publisher.publish(unrevisionedHeaders), 100));

  return merge(versioned, unversioned)
    .pipe(publisher.sync())
    .pipe(awspublish.reporter())
    .pipe(gulpif(!!awsConf.keys.distribution, invalidate(awsConf.keys)));
});
github micromata / generator-baumeister / app / templates / gulp / tasks / banners.js View on Github external
function banners(done) {
	const year = new Date().getFullYear();
	const fullDate = new Date().toLocaleDateString('en-US');

	const opts = {pkgJson, year, fullDate};
	if (isProdBuild() && generateBanners) {
		return merge(
			gulp.src(settings.destinations.prod.app + '**/*.js')
				.pipe(gulpBanner(banner, opts))
				.pipe(gulp.dest(settings.destinations.prod.app)),
		gulp.src(settings.destinations.prod.styles + '**/*.css')
			.pipe(gulpBanner(banner, opts))
			.pipe(gulp.dest(settings.destinations.prod.styles)),
		gulp.src(settings.destinations.prod.libs + '*.js')
			.pipe(gulpBanner(banner, opts))
			.pipe(gulp.dest(settings.destinations.prod.libs)),
		gulp.src(settings.destinations.prod.libs + '*.css')
			.pipe(gulpBanner(banner, opts))
			.pipe(gulp.dest(settings.destinations.prod.libs))
		);
	}
	done();
}
github vwxyutarooo / gulp-web-starter / tools / gulp / image.js View on Github external
gulp.task('sprite:inline-svg', () => {
  var folders = getFolders(paths.srcImg + 'sprite-svg');
  var tasks = folders.map((folder) => {
    return gulp.src(path.join(paths.srcImg + 'sprite-svg', folder, '/*.svg'))
      .pipe(svgSprite({
        dest: './',
        mode: { symbol: { dest: './' } }
      }))
      .pipe(rename({
        basename: 'symbol',
        dirname: './',
        prefix: 'sprite-' + folder + '.'
      }))
      .pipe(gulp.dest(paths.destImg));
  });
  return merge(tasks);
});
github locomotivemtl / locomotive-scroll / build / build.js View on Github external
}
    ];

    const scriptsStreams = scriptsfiles.map((file) => {
        return gulp
            .src([file.dest+'*.js', '!'+file.dest+'*.esm.js', '!'+file.dest+'*.min.js'])
            .pipe(rename(function(file) {
                if (file.basename == paths.scripts.main) {
                    file.basename += '.min';
                }
            }))
            .pipe(uglify())
            .pipe(gulp.dest(file.dest));
    });

    return merge(scriptsStreams);
}
github material-components / material-components-web / gulpfile.babel.js View on Github external
.pipe($.frontMatter({
      property: 'page',
      remove: true
    }))
    .pipe($.marked())
    .pipe((() => {
      return through.obj((file, enc, cb) => {
        file.page.component = component;
        cb(null, file);
      });
    })())
    .pipe(applyTemplate())
    .pipe(gulp.dest(path.join('dist', 'components', component)));
  });

  return mergeStream(tasks);
});

merge-stream

Create a stream that emits events from multiple other streams

MIT
Latest version published 5 years ago

Package Health Score

71 / 100
Full package analysis

Similar packages