Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 451294b

Browse files
committed
v3.3.0
1 parent 6fbf9fb commit 451294b

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ Use the ?cdn= parameter to set the source address of the third library load, def
9292
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
9393
```
9494

95+
Use the ?map= parameter to set the path to the third-party library, a JSON string, that is valid only with the path parameter.
96+
97+
```html
98+
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
99+
```
100+
101+
Using the ?npm= parameter loader will automatically go to npm to find the relevant library for sniffing loading, JSON string, module name and version number, only valid with the path parameter.
102+
103+
```html
104+
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
105+
```
106+
95107
You can use the fetchFiles method to load network files into memory.
96108

97109
```typescript

doc/README.sc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ loader.ready(function() {
9191
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
9292
```
9393

94+
使用 ?map= 参数设置第三方库的路径,JSON 字符串,仅在含有 path 参数下有效。
95+
96+
```html
97+
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
98+
```
99+
100+
使用 ?npm= 参数 loader 将自动去 npm 查找相关的库进行嗅探加载,JSON 字符串,模块名跟版本号,仅在含有 path 参数下有效。
101+
102+
```html
103+
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
104+
```
105+
94106
你可以使用 fetchFiles 方法加载网络文件到内存。
95107

96108
```typescript

doc/README.tc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ loader.ready(function() {
9191
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
9292
```
9393

94+
使用 ?map= 參數設置第三方庫的路徑,JSON 字串,僅在含有 path 參數下有效。
95+
96+
```html
97+
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
98+
```
99+
100+
使用 ?npm= 參數 loader 將自動去 npm 查找相關的庫進行嗅探載入,JSON 字串,模組名跟版本號,僅在含有 path 參數下有效。
101+
102+
```html
103+
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected]/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
104+
```
105+
94106
你可以使用 fetchFiles 方法載入網路檔到記憶體。
95107

96108
```typescript

0 commit comments

Comments
 (0)