A tool to combine files into a single file with the option of adding your own separators.
----------
Installation:
npm install -g combine-files // for global executable
npm install combine-files // for local use
----------
Usage:
// command line usage
combine-files [file names separated by comma (but with no spaces after the comma)] [output file name] [optional separator]
// in-code usage
var combineFiles = require('combine-files');
combineFiles([file name or an array of file names], [output file name], [optional separator]);
----------
Command line example:
combine-files input-1.txt,input-2.txt output.txt \n\n
Combines input-1.txt and input-2.txt with two new lines at the end of each file and outputs the result to output.txt. Note that there is no space after the comma.
----------
Another command line example:
combine-files . output.txt \n\n
Combines all files in current folder with two new lines at the end of each file and outputs the result to output.txt.
----------
In-code example:
var combineFiles = require('combine-files');
combineFiles(['input-1.txt', 'input-2.txt'], 'output.txt', '\n\n');
Combines input-1.txt and input-2.txt with two new lines at the end of each file and outputs the result to output.txt.