1.2.0 • Published 8 years ago

webpack-svg-sprite-plugin v1.2.0

Weekly downloads
22
License
MIT
Repository
github
Last release
8 years ago

webpack-svg-sprite-plugin

Commitizen friendly semantic-release Webpack plugin that finds all SVG assets in the build and generates a svg sprite with <symbol> elements.

Installation

$ npm i --save webpack-svg-sprite-plugin

Usage

  var SvgSpritePlugin = require('webpack-svg-sprite-plugin')

  module.exports = {
    // ...
    plugins: [
      new SvgSpritePlugin({ filename: 'my-sprite.svg' })
    ]
  }

Configuration

{
  filename: 'sprite-name.svg' // Filename the sprite will be added with. Default: 'svg-sprite.svg'
}

Scripts

  • npm run compile - Compiles the module to disk (~/lib).
  • npm run compile:watch - Same as npm run compile but watches files for changes.
  • npm run lint - Lints all files.
  • npm run lint:fix - Lints all files and attempts to fix any issues.
  • npm run test - Runs unit tests.
  • npm run test:watch - Same as npm test but watches files for changes.
  • npm run test:cov - Generates a test coverage report.

Commitizen

eslint-config-rentpath uses Commitizen to format commit messages.

  • Install it globally $ npm install -g commitizen Once you are ready to commit, follow the familiar github workflow, with a slight change.

    $ git add <files>
    $ git cz

    $ git cz will bring up the Commitizen commit prompt, follow the instructions, and $ git push as usual.

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago