@the-/icon

16.6.1 • Public • Published

@the-/icon

npm Version

Icon generator

Installation

$ npm install @the-/icon --save

Usage

'use strict'

/**
 * The is an example of Icon
 * @file example-usage.js
 */
const theIcon = require('@the-/icon')

const { Themes } = theIcon

async function tryExample() {
  const text = 'APE'
  const color = '#EA1'

  await theIcon({
    color,
    font: 'fonts/comicsans.ttf',
    text,
    theme: Themes.SQUARE,
  }).saveAs('foo/square-icon.png')
}

tryExample().catch((err) => console.error(err))

Themes

Theme Sample Output Sample code
Themes.CIRCLE theIcon({ theme:Themes.CIRCLE, text:'APE', color: '#A11', }).saveAs('circle.png')
Themes.CIRCLE_FILL theIcon({ theme:Themes.CIRCLE_FILL, text:'APE', color: '#A11', }).saveAs('circle-fill.png')
Themes.ROUND theIcon({ theme:Themes.ROUND, text:'APE', color: '#A11', }).saveAs('round.png')
Themes.ROUND_FILL theIcon({ theme:Themes.ROUND_FILL, text:'APE', color: '#A11', }).saveAs('round-fill.png')
Themes.SQUARE theIcon({ theme:Themes.SQUARE, text:'APE', color: '#A11', }).saveAs('square.png')
Themes.SQUARE_FILL theIcon({ theme:Themes.SQUARE_FILL, text:'APE', color: '#A11', }).saveAs('square-fill.png')

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i @the-/icon

Weekly Downloads

1

Version

16.6.1

License

MIT

Unpacked Size

106 kB

Total Files

31

Last publish

Collaborators

  • okunishinishi