GithubHelp home page GithubHelp logo

ios-icons's Introduction

ios-icons

Build Status Dependency Status devDependency Status Semantically Released

Get iOS icon file names and dimensions (width)

The default icon file names and required sizes for iOS are listed in a JSON file. This information is useful, for example, when you want to generate icons with the required sizes or to create a config.xml file for a PhoneGap/Cordova project or if you just need to create the icons for your iOS project from one source icon. This information also exists for android icons.

Install

$ npm install --save @randy.tarampi/ios-icons

Usage

var icons = require('@randy.tarampi/ios-icons');

icons();
//=> [{name: '[email protected]', width: 180}, {name: 'icon-60.png', width: 60, ...}]

icons({size: '72'})
//=> {name: 'icon-72.png', width: 72}

icons({size: 'small'})
//=> {name: 'icon-small.png', width: 29}

API

icons()

Returns an array of icons, each icon being represented by an object with name and width properties.

Notice that icons are always squares, so no height property is provided.

icons(options)

options

Only option for now is size, which can be either a Number or String value. If it is a Number, it represents the width in pixels. If it is a String, you can use "@2x" or "@3x" notation to refer to a certain size or the complete file name, e.g. icon-small.png.

Returns icon object for that size or null.

For example:

icons({size: "60@3x"});
// ==> {name: "[email protected]", width: 180}

CLI

ios-icons logs to stdout in comma-separated values format (csv) by default so you can easy pipe to other commands in UNIX systems.

$ npm install --global @randy.tarampi/ios-icons
$ ios-icons --help

Examples:
    $ ios-icons --format json --size 60
    { name: 'icon-60.png', width: 60 }

    $ ios-icons --size 60@3x
    [email protected],180

    $ ios-icons
    [email protected],180
    icon-60.png,60
    [email protected],120
    icon-76.png,76
    [email protected],152
    icon-40.png,40
    [email protected],80
    icon.png,57
    [email protected],114
    icon-72.png,72
    [email protected],144
    icon-small.png,29
    [email protected],58
    icon-50.png,50
    [email protected],100

    $ ios-icons --format json
    [{"name":"[email protected]","width":180},{"name":"icon-60.png","width":60},{"name":"[email protected]","width":120},{"name":"icon-76.png","width":76},{"name":"[email protected]","width":152},{"name":"icon-40.png","width":40},{"name":"[email protected]","width":80},{"name":"icon.png","width":57},{"name":"[email protected]","width":114},{"name":"icon-72.png","width":72},{"name":"[email protected]","width":144},{"name":"icon-small.png","width":29},{"name":"[email protected]","width":58},{"name":"icon-50.png","width":50},{"name":"[email protected]","width":100}]

Semantic Releases

Since version 2.0.0, this module is being semantically released. You can safely use "^2.0.0" in your package.json.

License

This was originally based on animals by Stephan Bönnemann. MIT © David Pfahler

ios-icons's People

Contributors

davidnpma avatar greenkeeper[bot] avatar katallaxie avatar randytarampi avatar semantic-release-bot avatar snyk-bot avatar

Watchers

 avatar  avatar

ios-icons's Issues

An in-range update of yargs is breaking the build 🚨

The dependency yargs was updated from 13.2.2 to 13.2.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

yargs is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Commits

The new version differs by 14 commits.

  • a6e67f1 chore(release): 13.2.4
  • fc13476 chore: update standard-verison dependency
  • bf46813 fix(i18n): rename unclear 'implication failed' to 'missing dependent arguments' (#1317)
  • a3a5d05 docs: fix a broken link to MS Terminology Search (#1341)
  • b4f8018 build: add .versionrc that hides test/build
  • 0c39183 chore(release): 13.2.3
  • 08e0746 chore: update deps (#1340)
  • 843e939 docs: make --no- boolean prefix easier to find in the docs (#1338)
  • 84cac07 docs: restore removed changelog of v13.2.0 (#1337)
  • b20db65 fix(deps): upgrade cliui for compatibility with latest chalk. (#1330)
  • c294d1b test: accept differently formatted output (#1327)
  • ac3f10c chore: move .hbs templates into .js to facilitate webpacking (#1320)
  • 0295132 fix: address issues with dutch translation (#1316)
  • 9f2468e doc: clarify parserConfiguration object structure (#1309)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.