-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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": | ||
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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”中添加: | ||
|
@@ -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 方法加载网络文件到内存。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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」中添加: | ||
|
@@ -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 方法載入網路檔到記憶體。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters