How to use the gulp.src function in gulp

To help you get started, we’ve selected a few gulp 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 PabloHidalgo / angularjs-1.5-components-showcase / gulpfile.js View on Github external
gulp.task('styles-less', function() {
    log('Compiling Less --> CSS');

    return gulp
        .src(config.less)
        .pipe($.plumber()) // exit gracefully if something fails after this
        .pipe($.less())
//        .on('error', errorLogger) // more verbose and dupe output. requires emit.
        .pipe($.autoprefixer({ browsers: ['last 2 version', '> 5%'] }))
        .pipe(gulp.dest(config.temp));
});
github cferdinandi / bouncer / gulpfile.js View on Github external
// If separate polyfill files enabled
				if (settings.polyfills) {

					// Update the suffix
					suffix = '.polyfills';

					// Grab files that aren't polyfills, concatenate them, and process them
					src([file.path + '/*.js', '!' + file.path + '/*' + paths.scripts.polyfills])
						.pipe(concat(file.relative + '.js'))
						.pipe(jsTasks());

				}

				// Grab all files and concatenate them
				// If separate polyfills enabled, this will have .polyfills in the filename
				src(file.path + '/*.js')
					.pipe(concat(file.relative + suffix + '.js'))
					.pipe(jsTasks());

				return stream;

			}

			// Otherwise, process the file
			return stream.pipe(jsTasks());

		}));
github floatdrop / gulp-plumber / test / errorHandling.js View on Github external
(function () {
                gulp.src(fixturesGlob)
                    .pipe(plumber({ errorHandler: false }))
                    .pipe(this.failingQueueStream)
                    .on('end', done);
            }).should.throw();
            done();
github aurelia / testing / build / tasks / build.js View on Github external
function srcForTypeScript() {
  return gulp
    .src(paths.output + paths.packageName + '.js')
    .pipe(rename(function (path) {
      if (path.extname == '.js') {
        path.extname = '.ts';
      }
    }));
}
github bunkerchat / bunker / gulpfile.js View on Github external
gulp.task('sass', function () {
	return gulp.src('./assets/styles/**/*.scss')
		.pipe(sourcemaps.init())
		.pipe(sass().on('error', err => {
			sass.logError.bind(this,err);
			throw err;
		}))
		.pipe(sourcemaps.write())
		.pipe(gulp.dest('./assets/bundled'));
});
github luangjokaj / wordpressify / gulpfile.js View on Github external
function headerScriptsDev() {
	return src(headerJS)
		.pipe(plumber({ errorHandler: onError }))
		.pipe(sourcemaps.init())
		.pipe(concat('header-bundle.js'))
		.pipe(sourcemaps.write('.'))
		.pipe(dest('./build/wordpress/wp-content/themes/' + themeName + '/js'));
}
github jasonsjones / doubly-linked-list / gulpfile.js View on Github external
gulp.task('jshint', function() {
    log('Analyzing source with JSHint and JSCS...');
    return gulp.src(source)
        .pipe($.jshint())
        .pipe($.jshint.reporter('jshint-stylish', {verbose: true}))
        .pipe($.jscs());
});
github lupino3 / edumips64 / src / main / web / gulpfile.js View on Github external
gulp.task('fonts', () => {
    return gulp.src(require('main-bower-files')('**/*.{eot,svg,ttf,woff,woff2}', function (err) {})
    .concat('app/fonts/**/*'))
    .pipe(gulp.dest('.tmp/fonts'))
    .pipe(gulp.dest('dist/fonts'));
});
github PatrickJS / koa-angular-seed / Gulpfile.js View on Github external
gulp.task('copy', function(cb) {
  return gulp.src(config.paths.public)
    .pipe(gulp.dest(config.build.path))
    .pipe(refresh(server));
});