1.0.20 • Published 5 months ago
csvg-to-font v1.0.20
Convert svg to font
- Convert svg to font
- Support React
- Support React Native
- Support Typescript
Demo
Install
npm i csvg-to-font@latest --save-dev
Setup
Create file: svgtofont.config.{ts,js,mjs}
import { defineConfig } from 'csvg-to-font';
export default defineConfig({
src: 'svg', // svg path
dist: 'dist', // output path
fontName: 'svgtofont', // font name
css: true, // Create CSS files.
outSVGReact: true,
outSVGReactNative: true, // Create React native folder
outSVGPath: true,
typescript: true,
});
CLI (file package.json)
-c: Config
{
...
"scripts": {
...
"svg-2-font": "csvg-to-font",
},
...
}
Custom config file
- You can also use a custom config file instead of
svgtofont.config.{ts,js,mjs}
. Just create<FILE_NAME>.config.{ts,js,mjs}
to build command
Exp: awesome.config.ts;
{
...
"scripts": {
...
"svg-2-font": "csvg-to-font -c awesome",
},
...
}
About
Gia Hung – hung.hg
1.0.19
5 months ago
1.0.20
5 months ago
1.0.18
5 months ago
1.0.17
5 months ago
1.0.16
5 months ago
1.0.15
7 months ago
1.0.14
7 months ago
1.0.13
7 months ago
1.0.11
7 months ago
1.0.10
7 months ago
1.0.9
7 months ago
1.0.8
8 months ago
1.0.7
8 months ago
1.0.6
8 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
10 months ago
1.0.1
10 months ago
0.0.1
10 months ago