1.2.0 • Published 9 years ago
webpack-svg-sprite-plugin v1.2.0
webpack-svg-sprite-plugin
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-pluginUsage
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 asnpm run compilebut 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 asnpm testbut 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 commitizenOnce you are ready to commit, follow the familiar github workflow, with a slight change.$ git add <files> $ git cz$ git czwill bring up the Commitizen commit prompt, follow the instructions, and$ git pushas usual.