Package Exports
- gulp-concat-filenames
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-concat-filenames) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Information
| Package | gulp-concat-filenames |
| Description | Similar to concat, but creates a list of names in the output file, rather than all the contents being merged. |
| Node Version | >= 0.10 |
Usage
Basic Usage, No options.
var concatFilenames = require('gulp-concat-filenames');
var concatFilenamesOptions = {
};
function fileManifest(){
gulp
.src('./lib/**/*.*')
.pipe(concatFilenames('manifest.txt', concatFilenamesOptions))
.pipe(gulp.dest('./output/'));
}
gulp.task('file-manifest', fileManifest);
###Arguments
Gulp concat-filenames takes 2 arguments: filename and options
####Filename
This first argment is the name of the output file the list fo filenames will be put into. This is required.
#####Options
The second argument is optional, and is an object with the following properties:
newline- The character to use in place of\nfor a newline. The default value will be\nprepend- Some text to prepend to every entry in the list of filenamesappend- Some text to append to every intry in the list of filenamesroot- the root folder. Including this argument will return a list of relative paths instead of absolute paths.
Given the file structure:
.
+-- somefile.txt
+-- lib
| +-- one.txt
| +-- two.txt
+-- gulpfile.js
var concatFilenames = require('gulp-concat-filenames');
var concatFilenamesOptions = {
root: '/lib',
prepend: '==> ',
append: ' <=='
};
function fileManifest(){
gulp
.src('./lib/**/*.*')
.pipe(concatFilenames('manifest.txt', concatFilenamesOptions))
.pipe(gulp.dest('./output/'));
}
gulp.task('file-manifest', fileManifest);running gulp file-manifest now produces a file called manifest.txt with the contents
==> one.txt <==
==> two.txt <==
