Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-concat-filenames

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-concat-filenames

Similar to concat, but creates a file with a list of filenames,not file contents.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status Coverage Status Codeship Status for the-simian/gulp-concat-filenames

Information

Packagegulp-concat-filenames
DescriptionSimilar 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 \n for a newline. The default value will be \n

  • prepend - Some text to prepend to every entry in the list of filenames

  • append - Some text to append to every intry in the list of filenames

  • root - 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 <==

Keywords

FAQs

Package last updated on 21 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc