@sj-distributor/react-iconfont-cli 2.1.0 → 2.1.1
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.
- package/README.md +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
用纯 JS 把 iconfont.cn 的图标转换成 React 组件,不依赖字体,支持多色彩
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
## 特性
|
|
8
8
|
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
# Yarn
|
|
21
|
-
yarn add react-iconfont-cli --dev
|
|
21
|
+
yarn add @sj-distributor/react-iconfont-cli --dev
|
|
22
22
|
|
|
23
23
|
# Npm
|
|
24
|
-
npm install react-iconfont-cli --save-dev
|
|
24
|
+
npm install @sj-distributor/react-iconfont-cli --save-dev
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
# Step 2
|
|
@@ -29,7 +29,7 @@ npm install react-iconfont-cli --save-dev
|
|
|
29
29
|
生成配置文件
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
npx iconfont-init
|
|
32
|
+
npx sj-iconfont-init
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
此时项目根目录会生成一个`iconfont.json`的文件,内容如下:
|
|
@@ -54,7 +54,7 @@ npx iconfont-init
|
|
|
54
54
|
|
|
55
55
|
<br />
|
|
56
56
|
|
|
57
|
-

|
|
58
58
|
|
|
59
59
|
### use_typescript
|
|
60
60
|
|
|
@@ -89,7 +89,7 @@ npx iconfont-init
|
|
|
89
89
|
开始生成 React 标准组件
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
npx iconfont-h5
|
|
92
|
+
npx sj-iconfont-h5
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
生成后查看您设置的保存目录中是否含有所有的图标,你可以参考[snapshots 目录](https://github.com/iconfont-cli/react-iconfont-cli/tree/master/snapshots)的快照文件,以区分不同模式下的图标结构。
|
|
@@ -139,7 +139,7 @@ export const App = () => {
|
|
|
139
139
|
<IconFont name="alipay" size={20} />
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-

|
|
143
143
|
|
|
144
144
|
### 图标单色
|
|
145
145
|
|
|
@@ -151,7 +151,7 @@ export const App = () => {
|
|
|
151
151
|
<IconFont name="alipay" color="green" />
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-

|
|
155
155
|
|
|
156
156
|
### 图标多色彩
|
|
157
157
|
|
|
@@ -163,7 +163,7 @@ export const App = () => {
|
|
|
163
163
|
|
|
164
164
|
颜色组的数量以及排序,需要根据当前图标的信息来确定。您需要进入图标组件中查看并得出结论。
|
|
165
165
|
|
|
166
|
-

|
|
167
167
|
|
|
168
168
|
### 与文字并排
|
|
169
169
|
|
|
@@ -182,7 +182,7 @@ export const App = () => {
|
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
184
|
# 修改 symbol_url 配置后执行:
|
|
185
|
-
npx iconfont-h5
|
|
185
|
+
npx sj-iconfont-h5
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
# 扩展
|