# fuse-concat-with-sourcemaps

> Concatenate file contents with a custom separator and generate a source map

Latest version **1.0.5** (published 2018-01-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install fuse-concat-with-sourcemaps
pnpm add fuse-concat-with-sourcemaps
yarn add fuse-concat-with-sourcemaps
bun add fuse-concat-with-sourcemaps
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-01-23 |
| First published | 2018-01-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 69 |
| Author | Florian Reiterer |
| Maintainers | nchanged |
| Keywords | concat, source map |

## Links

- npm: https://www.npmjs.com/package/fuse-concat-with-sourcemaps
- Repository: https://github.com/floridoo/concat-with-sourcemaps
- Homepage: http://github.com/floridoo/concat-with-sourcemaps
- Issues: https://github.com/floridoo/concat-with-sourcemaps/issues
- npm.io page: https://npm.io/package/fuse-concat-with-sourcemaps

## Dependencies (1)

- [source-map](https://npm.io/package/source-map.md) ^0.6.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2018-01-23

## README

## Concat with source maps [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url]

NPM module for concatenating files and generating source maps.

### Usage example
```js
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;
```

### API

#### new Concat(generateSourceMap, outFileName, separator)
Initialize a new concat object.

Parameters:
- generateSourceMap: whether or not to generate a source map (default: false)
- outFileName: the file name/path of the output file (for the source map)
- separator: the string that should separate files (default: no separator)

#### concat.add(fileName, content, sourceMap)
Add a file to the output file.

Parameters:
- fileName: file name of the input file (can be null for content without a file reference, e.g. a license comment)
- content: content (Buffer or string) of the input file
- sourceMap: optional source map of the input file (string). Will be merged into the output source map.

#### concat.content
The resulting concatenated file content (Buffer).

#### concat.sourceMap
The resulting source map of the concatenated files (string).

[npm-image]: https://img.shields.io/npm/v/concat-with-sourcemaps.svg
[npm-url]: https://www.npmjs.com/package/concat-with-sourcemaps
[travis-image]: https://img.shields.io/travis/floridoo/concat-with-sourcemaps.svg
[travis-url]: https://travis-ci.org/floridoo/concat-with-sourcemaps
[coveralls-image]: https://img.shields.io/coveralls/floridoo/concat-with-sourcemaps.svg
[coveralls-url]: https://coveralls.io/r/floridoo/concat-with-sourcemaps?branch=master

---
_Source: https://npm.io/package/fuse-concat-with-sourcemaps · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
