# broccoli-svg-concatenator

> A Broccoli tree that concatenates all SVG files in a tree into a hash exported on window.

Latest version **0.1.0** (published 2014-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install broccoli-svg-concatenator
pnpm add broccoli-svg-concatenator
yarn add broccoli-svg-concatenator
bun add broccoli-svg-concatenator
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-08-27 |
| First published | 2014-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sebastian Seilund |
| Maintainers | sebastianseilund |

## Links

- npm: https://www.npmjs.com/package/broccoli-svg-concatenator
- Repository: https://github.com/sebastianseilund/broccoli-svg-concatenator
- Issues: https://github.com/sebastianseilund/broccoli-svg-concatenator/issues
- npm.io page: https://npm.io/package/broccoli-svg-concatenator

## Dependencies (5)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [bluebird](https://npm.io/package/bluebird.md) ^2.3.2
- [broccoli-writer](https://npm.io/package/broccoli-writer.md) ^0.1.1
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^1.2.0

## Recent versions

- 0.1.0 (latest) — 2014-08-27

## README

broccoli-svg-concatenator
=========================

A Broccoli tree that concatenates all SVG files in a tree into a hash exported
on window.

This way you can include SVG graphics directly in your code and render it to the
DOM without extra network requests.


## Installation

```
npm install --save broccoli-svg-concatenator
```


## Usage

```javascript
var tree = concatSvg(inputTree, options);
```

Example:

```javascript
var concatSvg = require('broccoli-svg-concatenator');

var svg = concatSvg('public/assets/images', {
    outputFile: 'assets/svg.js',
    name: 'MySvg'
});
```

Will find all `.svg` files inside `public/assets/images` and save a file to
`assets/svg.js` like this:

```javascript
window.MySvg = {
    'icons/house': '...svg...',
    'shapes/circle': '...svg...'
};
```


### Options

- `outputFile` **required**: The file to write the SVG contents to.
- `name`: The name of the variable exposed on `window` containing all the SVG contents. Defaults to `Svg`.

---
_Source: https://npm.io/package/broccoli-svg-concatenator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
