svg-sprites

svg-sprites

An AssetAggregator that creates SVG sprites with PNG fallbacks at needed sizes via dr-svg-sprites.

Make sure you’ve already set up the assets module in your project!

dependency

<dependency>
 <groupId>org.jooby</groupId>
 <artifactId>jooby-assets-svg-sprites</artifactId>
 <version>1.6.6</version>
 <scope>provided</scope>
</dependency>

usage

assets {
  fileset {

    sprite: svg-sprites
    home: home.scss
  }

  svg-sprites {

    spriteElementPath: "images/svg-source",
    spritePath: "css"
  }

}

The spriteElementPath contains all the *.svg files you want to process. The spritePath indicates where to save the sprite, here you will find the following generated files: css/sprite.css, css/sprite.svg and css/sprite.png.

options

assets {
  fileset {

    sprite: svg-sprites
    home: home.scss
  }

  svg-sprites {

    spriteElementPath: "images/svg-source",
    spritePath: "css",
    layout: "vertical",
    sizes: {
      large: 24,
      small: 16
    },
    refSize: "large"
  }

}

Please refer to dr-svg-sprites for more details.

see also

css processors

js processors

  • props: replace application properties in JavaScript files.

  • jscs: JavaScript code style checker.

  • jshint: JavaScript linter, helps to detect errors and potential problems in code..

  • babel: Ecma6 now via Babel.

  • rollup: rollup.js the next-generation ES6 module bundler.

  • ng-annotate: Add, remove and rebuild AngularJS dependency injection annotations.

  • closure-compiler: Google JavaScript optimizer and minifier.

  • uglify: uglify.js optimizer.

  • replace: replace strings in files while bundling them.

  • requirejs: r.js optimizer.

  • yui-js: YUI JS optimizer.