0.0.11 • Published 9 years ago

svg-to-android v0.0.11

Weekly downloads
47
License
-
Repository
github
Last release
9 years ago

svg-to-android

This is a cli tool that renders SVGs into appropriately sized Android drawable PNGs for different densities.

Installation

To install from npm, run

npm install -g svg-to-android

Usage

CLI

svg-to-android input... [-q] [-o outputDir] [-d density]

  • input...: a list of SVG files
  • -q: Makes the tool quiet; will not output to console
  • -o outputDir: Specify where to save the drawable-{density} folders. Defaults to current directory.
  • -d density: Specify what density the SVG is currently sized as. That is, the dimensions defined in the SVG will be considered to be the density you provide, and all other densities will be resized relative to that density. Defaults to mdpi.
  • -D outputDensity: Specify which densities you want to render into. Use this option multiple times for multiple output densities. Defaults to all dpis from ldpi to xxxdpi.

Module

svg-to-android can also be used in your own Node scripts. Here is an example:

var svg2android = new Svg2Android({
  outputDir: "path/to/output",
  density: 'mdpi',
  verbose: false
});

// renderSvg accepts a single path or an array of paths
svg2android.renderSvg(["dog.svg", "cat.svg"]);

Building

To compile the source just run grunt.

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago