Skip to content

Commit

Permalink
v3.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
yunbookf committed Jun 17, 2024
1 parent e53c679 commit d9bce27
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ $ npm i @litert/loader@dev --save

### CDN (recommend)

Recommended: https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/loader.min.js, you can also find it here https://cdn.jsdelivr.net/npm/@litert/loader/.
Recommended: https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/loader.min.js, you can also find it here https://cdn.jsdelivr.net/npm/@litert/loader/.

Also available on [unpkg](https://unpkg.com/@litert/[email protected].5/dist/loader.min.js).
Also available on [unpkg](https://unpkg.com/@litert/[email protected].6/dist/loader.min.js).

## Usage

Here's a general how to use it:

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/loader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/loader.min.js"></script>
```

The code hint needs to be added in "tsconfig.json":
Expand Down Expand Up @@ -88,25 +88,25 @@ loader.ready(function() {
Alternatively, use ?path= to load the ingress file directly, the js file extension can be omitted.

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?path=../lib/test"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?path=../lib/test"></script>
```

Use the ?cdn= parameter to set the source address of the third library load, default is: https://cdn.jsdelivr.net.

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
```

Use the ?map= parameter to set the path to the third-party library, a JSON string, that is valid only with the path parameter.

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
```

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.

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
```

You can use the fetchFiles method to load network files into memory.
Expand Down
14 changes: 7 additions & 7 deletions doc/README.sc.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ $ npm i @litert/loader@dev --save

### CDN(推荐)

推荐引用地址:https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js,也可以此处查找:https://cdn.jsdelivr.net/npm/@litert/loader/。
推荐引用地址:https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js,也可以此处查找:https://cdn.jsdelivr.net/npm/@litert/loader/。

同样可使用 [unpkg](https://unpkg.com/@litert/[email protected].5/dist/index.min.js)
同样可使用 [unpkg](https://unpkg.com/@litert/[email protected].6/dist/index.min.js)

## Usage

通常的使用方式:

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js"></script>
```

代码提示需要在“tsconfig.json”中添加:
Expand Down Expand Up @@ -88,25 +88,25 @@ loader.ready(function() {
或者使用 ?path= 直接加载入口 js 文件,js 后缀可省略。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?path=../lib/test"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?path=../lib/test"></script>
```

使用 ?cdn= 参数设置第三库加载的源地址,默认为:https://cdn.jsdelivr.net。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
```

使用 ?map= 参数设置第三方库的路径,JSON 字符串,仅在含有 path 参数下有效。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
```

使用 ?npm= 参数 loader 将自动去 npm 查找相关的库进行嗅探加载,JSON 字符串,模块名跟版本号,仅在含有 path 参数下有效。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
```

你可以使用 fetchFiles 方法加载网络文件到内存。
Expand Down
14 changes: 7 additions & 7 deletions doc/README.tc.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ $ npm i @litert/loader@dev --save

### CDN(推薦)

推薦引用位址:https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js,也可以此處查找:https://cdn.jsdelivr.net/npm/@litert/loader/。
推薦引用位址:https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js,也可以此處查找:https://cdn.jsdelivr.net/npm/@litert/loader/。

同樣可使用 [unpkg](https://unpkg.com/@litert/[email protected].5/dist/index.min.js)
同樣可使用 [unpkg](https://unpkg.com/@litert/[email protected].6/dist/index.min.js)

## Usage

通常的使用方式:

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js"></script>
```

代碼提示需要在「tsconfig.json」中添加:
Expand Down Expand Up @@ -88,25 +88,25 @@ loader.ready(function() {
或者使用 ?path= 直接載入入口 js 檔,js 後綴可省略。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?path=../lib/test"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?path=../lib/test"></script>
```

使用 ?cdn= 參數設置三方庫載入的源地址,預設為:https://cdn.jsdelivr.net。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?cdn=https://cdn.xxx.xxx"></script>
```

使用 ?map= 參數設置第三方庫的路徑,JSON 字串,僅在含有 path 參數下有效。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?&path=xxx&map={'xxx':'https://xx/npm/index'}"></script>
```

使用 ?npm= 參數 loader 將自動去 npm 查找相關的庫進行嗅探載入,JSON 字串,模組名跟版本號,僅在含有 path 參數下有效。

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].5/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/[email protected].6/dist/index.min.js?&path=xxx&npm={'xxx':'1.0.0'}"></script>
```

你可以使用 fetchFiles 方法載入網路檔到記憶體。
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@litert/loader",
"version": "3.5.5",
"version": "3.5.6",
"description": "Simple browser module loader.",
"keywords": [
"litert",
Expand Down

0 comments on commit d9bce27

Please sign in to comment.