@zcrkey/js-utils 0.0.2 → 0.0.3
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 +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## 安装和使用
|
|
6
6
|
|
|
7
|
+
### 通过 import 方式安装
|
|
8
|
+
|
|
7
9
|
在开始之前,你可能需要安装 [yarn](https://github.com/yarnpkg/yarn/) 或者 [pnpm](https://pnpm.io/zh/)。
|
|
8
10
|
|
|
9
11
|
从 yarn 或 npm 或 pnpm 安装并引入
|
|
@@ -36,6 +38,19 @@ const App = () => (
|
|
|
36
38
|
export default App;
|
|
37
39
|
```
|
|
38
40
|
|
|
41
|
+
### 通过独立版本安装
|
|
42
|
+
|
|
43
|
+
- 下载 @zcrkey/js-utils 的独立版本文件(如 index.umd.js)
|
|
44
|
+
- 在 HTML 文件的 \<head\> 或 \<body\> 部分添加 \<script\> 标签,并指向下载的 @zcrkey/js-utils 文件
|
|
45
|
+
- 在 HTML 文件中使用 @zcrkey/js-utils
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
<script src="./index.umd.js"></script>
|
|
49
|
+
<script>
|
|
50
|
+
console.log(CrUtil.trim(' @zcrkey/js-utils '))
|
|
51
|
+
</script>
|
|
52
|
+
```
|
|
53
|
+
|
|
39
54
|
## LICENSE
|
|
40
55
|
|
|
41
56
|
MIT
|