# icont-cli

> a tool to convert svg to ttf

Latest version **1.0.5** (published 2020-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install icont-cli
pnpm add icont-cli
yarn add icont-cli
bun add icont-cli
```

Provides the command `icont`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-08-21 |
| First published | 2020-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 71.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | lyn-euler |
| Maintainers | lyzz |
| Keywords | svg, flutter, ttf |

## Links

- npm: https://www.npmjs.com/package/icont-cli
- Repository: https://github.com/lyn-euler/icont-cli
- Homepage: https://github.com/lyn-euler/icont-cli#readme
- Issues: https://github.com/lyn-euler/icont-cli/issues
- npm.io page: https://npm.io/package/icont-cli

## Dependencies (5)

- [svg2ttf](https://npm.io/package/svg2ttf.md) ^5.0.0
- [commander](https://npm.io/package/commander.md) ^5.1.0
- [colors-cli](https://npm.io/package/colors-cli.md) ^1.0.27
- [svgicons2svgfont](https://npm.io/package/svgicons2svgfont.md) ^9.1.1
- [copy-template-dir](https://npm.io/package/copy-template-dir.md) ^1.4.0

## Recent versions

- 1.0.5 (latest) — 2020-08-21
- 1.0.4 — 2020-06-12
- 1.0.3 — 2020-06-11
- 1.0.2 — 2020-06-11
- 1.0.1 — 2020-06-11
- 1.0.0 — 2020-06-11

## README

# icont-cli
A tool which convert svg(s) to tff, and output `.dart` file for flutter project
And u can copy result(s) to dist dir.
## Install

```shell
npm install -g icont-cli
```

## Usage 

### convert svg(s) to ttf & dart file

```shell
Usage: icont [options] [command]

Convert SVG(s) to ttf file

Options:
  -v, --version           output the version number
  -i, --input <path|dir>  input svg dir or file path (default: "svg")
  -o, --output <dir>      output path (default: "output")
  -n, --fontname <name>   output font name (default: "iconfonts")
  -h, --help              display help for command

Commands:
  copy [options]          copy file to target dir.
```


### copy files

```shell
Usage: icont copy [options]

copy file to target dir.

Options:
  -d, --dist <dir>     dist dir
  -s, --src <dir>      copy form dir
  -e, --ext <extname>  file ext name
  -h, --help           display help for command
```

## Flutter Project Configuration Demo

- pubspec.yaml

```shell
fonts:
    - family: iconfonts
      fonts:
        - asset: iconfonts/iconfonts.ttf
```

- script sample

```shell
#!/usr/bin/env bash
if [ ! `command -v icont` ]; then
  npm install -g icont-cli
fi

temp_dir='.icont'
fonts_dir='fonts'
dart_path='lib'

# svg to ttf & dart
icont -i svg -o $temp_dir

# copy to target dir
icont copy -s $temp_dir -d $fonts_dir -e .ttf
icont copy -s $temp_dir -d $dart_path -e .dart

# delete temp dir
# rm -rf $temp_dir
```

---
_Source: https://npm.io/package/icont-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
