logo-builder

a simple logo spec builder

ISC License

Stars
1

Logo Builder version License Build Status Downloads Coverage Status

a simple logo spec builder

Install

npm install --production --save logo-builder

CLI

logo [config] <output>

Logo Builder

Positionals:
  config  path to logo config file
  output  path to logo output

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]https://schemas.bench.ci/environments/1.0.0/schema.json

API

builder(config, [cwd, format])

argument type required default description
config Object - configuration object
cwd String process.cwd() root path to search for font and icon files
format enum svg desired output format, possible values: svg, png, pdf
const builder = require('logo-builder')

const config = {
  size: {
    width: 500,
    height: 200
  },
  title: {
    text: "Logo Title",
    font: {
      name: "Roboto",
      path: "font.ttf"
    }
  },
  icon: {
    path: "icon.svg"
  }
}

logo(config, './logo/', 'svg'))
  .then(buffer => ...) // SVG buffer
  .catch(console.error)

Configuration Object

Example
{
  size: {
    width: 500,
    height: 200
  },
  title: {
    text: "Logo Title",
    font: {
      name: "Roboto",
      path: "font.ttf"
    }
  },
  icon: {
    path: "icon.svg"
  }
}

License: ISC • Copyright: ahmadnassri.com • Github: @ahmadnassri • Twitter: @ahmadnassri