How to use gulp-concat-util - 10 common examples

To help you get started, we’ve selected a few gulp-concat-util 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 brunosimon / burno.js / _gulp / gulpfile.js View on Github external
options.paths.sources + 'tools/colors.class.js',
        options.paths.sources + 'tools/css.class.js',
        options.paths.sources + 'tools/detector.class.js',
        options.paths.sources + 'tools/ga_tags.class.js',
        options.paths.sources + 'tools/keyboard.class.js',
        options.paths.sources + 'tools/konami_code.class.js',
        options.paths.sources + 'tools/mouse.class.js',
        options.paths.sources + 'tools/offline.class.js',
        options.paths.sources + 'tools/registry.class.js',
        options.paths.sources + 'tools/resizer.class.js',
        options.paths.sources + 'tools/strings.class.js',
        options.paths.sources + 'tools/ticker.class.js',
        options.paths.sources + 'tools/viewport.class.js',
    ] )
    .pipe( concat( 'burno-' + options.version + '.js' ) )
    .pipe( concat.header( before ) )
    .pipe( concat.footer( after ) )
    .pipe( concat.header( signature ) )
    .pipe( gulp.dest( options.paths.destination ) )
    .pipe( uglify() )
    .pipe( concat.header( signature ) )
    .pipe( rename( { extname : '.min.js' } ) )
    .pipe( gulp.dest( options.paths.destination ) );

    // Without polyfill
    gulp.src( [
        options.paths.sources + 'core/b.class.js',
        options.paths.sources + 'core/abstract.class.js',
        options.paths.sources + 'core/event_emitter.class.js',

        options.paths.sources + 'tools/browser.class.js',
        options.paths.sources + 'tools/colors.class.js',
github mathiasbynens / jquery-visibility / gulpfile.js View on Github external
gulp.task('build', ['lint'], function() {
	var replacePatterns = {
		patterns: [
			{
				match: /%VERSION%/gm,
				replacement: options.version
			}
		]
	};
	return gulp.src("src/*.js")
		// make uncompressed
		.pipe(plumber())
		.pipe(concat.header(options.banner.uncompressed))
		.pipe(replace(replacePatterns))
    .pipe(size({showFiles: true}))
		.pipe(gulp.dest('./'))
		// make minified
		.pipe(uglify())
		.pipe(concat.header(options.banner.minified))
		.pipe(replace(replacePatterns))
		.pipe(rename({suffix: ".min"}))
    .pipe(size({showFiles: true}))
		.pipe(gulp.dest('./'));
});
github ng-tools / ng-factory / lib / tasks / docs / readme.js View on Github external
gulp.task('ng:docs/readme', function() {

    var locals = require('./locals')(config);

    // Build readme from user-defined template that extends ng-factory's one
    return gulp.src('README.tpl.md', {cwd: docs.cwd})
      .pipe(concat.header('{% extends "node_modules/ng-factory/lib/templates/readme/README.tpl.md" %}'))
      .pipe(template({
        cwd : process.cwd(),
        locals: locals
      }))
      .pipe(gulp.dest('.'));

  });
github brunosimon / burno.js / _gulp / gulpfile.js View on Github external
options.paths.sources + 'tools/css.class.js',
        options.paths.sources + 'tools/detector.class.js',
        options.paths.sources + 'tools/ga_tags.class.js',
        options.paths.sources + 'tools/keyboard.class.js',
        options.paths.sources + 'tools/konami_code.class.js',
        options.paths.sources + 'tools/mouse.class.js',
        options.paths.sources + 'tools/offline.class.js',
        options.paths.sources + 'tools/registry.class.js',
        options.paths.sources + 'tools/resizer.class.js',
        options.paths.sources + 'tools/strings.class.js',
        options.paths.sources + 'tools/ticker.class.js',
        options.paths.sources + 'tools/viewport.class.js',
    ] )
    .pipe( concat( 'burno-' + options.version + '.js' ) )
    .pipe( concat.header( before ) )
    .pipe( concat.footer( after ) )
    .pipe( concat.header( signature ) )
    .pipe( gulp.dest( options.paths.destination ) )
    .pipe( uglify() )
    .pipe( concat.header( signature ) )
    .pipe( rename( { extname : '.min.js' } ) )
    .pipe( gulp.dest( options.paths.destination ) );

    // Without polyfill
    gulp.src( [
        options.paths.sources + 'core/b.class.js',
        options.paths.sources + 'core/abstract.class.js',
        options.paths.sources + 'core/event_emitter.class.js',

        options.paths.sources + 'tools/browser.class.js',
        options.paths.sources + 'tools/colors.class.js',
        options.paths.sources + 'tools/css.class.js',
github mckeever02 / tryingtowork / gulpfile.js View on Github external
gulp.task('sass:critical', function() {
  return gulp.src('css/main.css')
    // wrap with style tags
    .pipe(concat.header('<style>'))
    .pipe(concat.footer('</style>'))
    // convert it to an include file
    .pipe(rename({
        basename: 'criticalCSS',
        extname: '.html'
      }))
    // insert file in the includes folder
    .pipe(gulp.dest('_includes/'));
    });
github CrackerakiUA / ui-cropper / gulpfile.js View on Github external
return gulp.src([
        Config.paths.source.js + '/init.js',
        Config.paths.source.js + '/classes/*.js',
        Config.paths.source.js + '/ui-cropper.js'
    ])
        .pipe(concat('ui-cropper' + '.js', {
            separator: '\n\n',
            process: function (src) {
                // Remove all 'use strict'; from the code and
                // replaces all double blank lines with one
                return src.replace(/\r\n/g, '\n')
                    .replace(/'use strict';\n+/g, '')
                    .replace(/\n\n\s*\n/g, '\n\n');
            }
        }))
        .pipe(concat.header(Config.banners.unminified + '\n' +
            '(function() {\n\'use strict\';\n\n'))
        .pipe(concat.footer('\n}());'))
        .pipe(gulp.dest(Config.paths.tmp));
});
github alexk111 / SVG-Morpheus / gulpfile.js View on Github external
gulp.task('scripts', function(){
  return gulp.src([
      Config.paths.source.js + '/deps/**/*.js',
      Config.paths.source.js + '/svg-morpheus.js'
    ])
    .pipe(concat(pkg.name+'.js', {
      separator: '\n\n',
      process: function(src) {
        // Remove all 'use strict'; from the code and
        // replaces all double blank lines with one
        return src.replace(/\r\n/g, '\n')
                  .replace(/'use strict';\n+/g, '')
                  .replace(/\n\n\s*\n/g, '\n\n');
      }
    }))
    .pipe(concat.header(Config.banners.unminified + '\n' +
                        '(function() {\n\'use strict\';\n\n'))
    .pipe(concat.footer('\n}());'))
    .pipe(gulp.dest(Config.paths.compileUnminified.js));
});
github devisephp / cms / tests / integrated / vendor / devisephp / cms / gulpfile.js View on Github external
findNestedDependencies: false,
    wrap: true,
    out: 'devise.js',
    include: [
        'config',
        'jquery',
        'jquery-ui',
        'jqNestedSortable',
        'datetimepicker',
        'dvsPublic',
        'fullCalendar',
        'scrollTo',
        'localScroll'
    ]
  })
  .pipe(concat.header(fs.readFileSync('public/js/devise.require.js', 'utf8') + '\n'))
  .pipe(concat.footer("\ndevise.require(['jquery'], function($){ devise.$ = $; });"))
  .pipe(gulp.dest('public/js'))
  .pipe(uglify())
  .pipe(rename('devise.min.js'))
  .pipe(gulp.dest('public/js'));
});
github mozilla-services / screenshots / gulpfile.js View on Github external
gulp.task("6to5", function () {
  return gulp.src(["server/src/**/*.{js,jsx}"])
    .pipe(sourcemaps.init())
    .pipe(to5())
    .pipe(concat.header(
      "//# sourceMappingURL=&lt;% print(file.path.replace('/src/', '/dist/')) %&gt;.map\n" +
      "if (typeof require !== 'undefined') { require('source-map-support').install(); }\n" +
      "var BUILD_TIMESTAMP = '" + new Date() + "';\n"))
    .pipe(sourcemaps.write(".", {sourceRoot: __dirname + "/server/src"}))
    .pipe(gulp.dest("dist/server"));
});
github ImanMh / persianRex / gulpfile.js View on Github external
gulp.task('default', function () {
	return gulp.src('src/main.js').
    pipe(rename('persian-rex.js')).
    pipe(concat.header(banner)).
    pipe(gulp.dest('dist')).
    pipe(uglify('persian-rex.min.js', {
      outSourceMap: true,
    })).
    pipe(concat.header(banner)).
    pipe(gulp.dest('dist'));
});

gulp-concat-util

Gulp task to concat, prepend, append or transform files

MIT
Latest version published 8 years ago

Package Health Score

39 / 100
Full package analysis

Popular gulp-concat-util functions