Created
December 14, 2014 18:20
Revisions
-
sudodoki created this gist
Dec 14, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ var gulp = require('gulp'); var concat = require('gulp-concat-util'); var through = require('through'); var gutil = require('gulp-util'); var refObj = {wallOfText: ''}; function write(file) { refObj.wallOfText += "/* " + file.path + " */" + gutil.linefeed; this.emit('data', file); } function end() { this.emit('end'); } gulp.task('scripts', function() { gulp.src('./src/*.js') .pipe(through(write, end)) .pipe(concat('all.js')) .pipe(concat.header('/* Files concatenated for this file:*/\n<%= refObj.wallOfText %>\n', {refObj: refObj})) .pipe(gulp.dest('./dist/')) }); gulp.task('default', ['scripts']);