# @ephox/svgroup

> Bundler for SVG files

Latest version **1.0.3** (published 2018-12-05) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @ephox/svgroup
pnpm add @ephox/svgroup
yarn add @ephox/svgroup
bun add @ephox/svgroup
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-12-05 |
| First published | 2018-10-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 44.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ephox Corporation |
| Maintainers | ephox |

## Links

- npm: https://www.npmjs.com/package/@ephox/svgroup
- Repository: https://github.com/ephox/svgroup
- Homepage: https://github.com/ephox/svgroup#readme
- Issues: https://github.com/ephox/svgroup/issues
- npm.io page: https://npm.io/package/@ephox/svgroup

## Recent versions

- 1.0.3 (latest) — 2018-12-05
- 1.0.2 — 2018-10-02
- 1.0.1 — 2018-10-02
- 1.0.0 — 2018-10-02

## README

# Bundler for SVG files
This project contains resources for bundling SVG files. Currently a gulp plugin is provided which can take one or more 'producers' as an option which will generate the output files from the SVGs fed to them.

# Installation
`svgroup` is available as an `npm` package.  You can install it via the npm package `@ephox/svgroup`

## Install from npm
`npm install @ephox/svgroup`

# Usage

```
const gulpSvgroup = require('@ephox/svgroup/gulp-svgroup');
const svgroup = require('@ephox/svgroup');
const gulp = require('gulp');

gulp.task('default', function () {
  return gulp.src('svg_sample/**/*.svg')
    .pipe(gulpSvgroup({
      producer: svgroup.providerProducer,
      options: { ... }
    }))
    .pipe(gulp.dest('dist'));
});
```
##### Existing producers and their default options
* Provider
  ```
  {
    producer: svgroup.providerProducer,
    options: {
      filename: 'SvgProvider.ts',
      normalizeKeys: false,
      head: 'export const getAll = () => (',
      tail: ');',
      quoteType: 'single',
      quoteKeys: true,
    }
  }
  ```
  ```
  %head%{
    %filename%: %content%,
    // ...
  }%tail%
  ```
* Enum map
  ```
  {
    producer: svgroup.enumMapProducer,
    options: {
      filename: 'SvgEnumMap.ts',
      enumName: 'Enums',
      normalizeValues: false,
      quoteType: 'single'
    }
  }
  ```
  ```
  enum %name% {
    %filename%: %filename%,
    // ...
  }
  ```
* Preview
  ```
  {
    producer: svgroup.previewProducer,
    options: {
      filename: 'Preview.html',
      title: 'Svg Icons Preview'
    }
  }
  ```

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