wmt-polyicon 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Polyicon
1
+ # wmt-polyicon
2
2
 
3
3
  SVG to icon font generator with HTML preview — Fontello-style output for React and web projects.
4
4
 
@@ -8,13 +8,13 @@ Converts a folder of SVGs into `woff2`, `woff`, `ttf`, `eot`, `svg` font files p
8
8
 
9
9
  ```bash
10
10
  # project dev dependency
11
- npm i -D polyicon
11
+ npm i -D wmt-polyicon
12
12
 
13
13
  # or global
14
- npm i -g polyicon
14
+ npm i -g wmt-polyicon
15
15
 
16
16
  # or one-off
17
- npx polyicon init
17
+ npx wmt-polyicon init
18
18
  ```
19
19
 
20
20
  ## Quick Start
@@ -36,6 +36,7 @@ Place your SVGs in the folder specified by `svg` in `.polyiconrc`, then run `gen
36
36
  "outputTypes": "./src/types/IconTypes.js",
37
37
  "polyiconConfig": "./src/assets/fontello/config.json",
38
38
  "importFontsPath": "../font/",
39
+ "classPrefix": "icon",
39
40
  "formats": ["eot", "svg", "ttf", "woff", "woff2"]
40
41
  }
41
42
  ```
@@ -47,7 +48,8 @@ Place your SVGs in the folder specified by `svg` in `.polyiconrc`, then run `gen
47
48
  | `outputStyles` | | CSS file output path |
48
49
  | `outputTypes` | ✓ | JS or TS types file output path |
49
50
  | `polyiconConfig` | | Fontello-compatible `config.json` output path |
50
- | `importFontsPath` | | Font URL prefix in the generated CSS (e.g. `../font/`) |
51
+ | `importFontsPath` | | Font URL prefix in the generated CSS (e.g. `../font/` or a CDN URL) |
52
+ | `classPrefix` | | CSS class prefix for icons (default: `icon`) |
51
53
  | `formats` | | Font formats to generate (default: all five) |
52
54
 
53
55
  SVG filenames become CSS class names. Spaces and special characters are auto-sanitised to hyphens. Use clean, single-colour SVGs — icon fonts are monochrome.
@@ -83,7 +85,7 @@ import "./assets/fontello/css/polyicon.css";
83
85
  Use icons by class name:
84
86
 
85
87
  ```jsx
86
- <i className="polyicon polyicon-home" />
88
+ <i className="icon-home" />
87
89
  ```
88
90
 
89
91
  Or with the generated types for autocomplete:
@@ -91,13 +93,13 @@ Or with the generated types for autocomplete:
91
93
  ```jsx
92
94
  import IconTypes from "./types/IconTypes";
93
95
 
94
- <i className={`polyicon polyicon-${IconTypes.HOME}`} />
96
+ <i className={`icon-${IconTypes.HOME}`} />
95
97
  ```
96
98
 
97
99
  ## Programmatic API
98
100
 
99
101
  ```js
100
- const { buildIcons } = require("polyicon");
102
+ const { buildIcons } = require("wmt-polyicon");
101
103
 
102
104
  await buildIcons({
103
105
  svg: "./src/assets/svg",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wmt-polyicon",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "SVG to icon font generator with HTML preview — Fontello-style output for React and web projects.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",