This package has been deprecated

Author message:

This package has been archived and is no longer being maintained

@ephox/svgroup

1.0.3 • Public • Published

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'
      }
    }
    

Keywords

none

Install

DownloadsWeekly Downloads

6

Version

1.0.3

License

Apache-2.0

Unpacked Size

45.6 kB

Total Files

5

Last publish

Collaborators

  • ephox