package
Concatenate file contents with a custom separator and generate a source map
npm install concat-with-sourcemapsGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
189.3 kB
Includes dependencies.
NPM module for concatenating files and generating source maps.
var concat = new Concat(true, 'all.js', '\n');
concat.add(null, "// (c) John Doe");
concat.add('file1.js', file1Content);
concat.add('file2.js', file2Content, file2SourceMap);
var concatenatedContent = concat.content;
var sourceMapForContent = concat.sourceMap;Initialize a new concat object.
Parameters:
Add a file to the output file.
Parameters:
The resulting concatenated file content (Buffer).
The resulting source map of the concatenated files (string).