Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yunbookf committed May 19, 2023
1 parent e984da3 commit 4053225
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/.vscode/
/dist/test-node*
/dist/*.d.ts
!/dist/index.d.ts
/dist/update*
/node_modules/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $ npm i @litert/mime --save
If you're using it in a browser, you can utilize the CDN mode.

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.2'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.3'}"></script>
```

## Usage
Expand Down
10 changes: 10 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export interface IData {
[ext: string]: IDataItem;
}
export interface IDataItem {
'mime': string;
'compressible': boolean;
'extension': string;
}
export declare function getData(path: string): IDataItem;
export declare function getMime(path: string): string;
2 changes: 1 addition & 1 deletion doc/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ npm i @litert/mime --save
ブラウザで使用する場合は、CDN モードを使用できます:

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.2'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.3'}"></script>
```

## 使用
Expand Down
2 changes: 1 addition & 1 deletion doc/README.sc.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ npm i @litert/mime --save
如果你在浏览器中使用,可以使用 CDN 模式:

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.2'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.3'}"></script>
```

## 使用
Expand Down
2 changes: 1 addition & 1 deletion doc/README.tc.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ npm i @litert/mime --save
如果你在瀏覽器中使用,可以使用 CDN 模式:

```html
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.2'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'@litert/mime':'0.1.3'}"></script>
```

## 使用
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@litert/mime",
"version": "0.1.2",
"version": "0.1.3",
"description": "Get MIME type based on file name, path, and extension.",
"keywords": [
"litert",
Expand All @@ -21,7 +21,7 @@
"node": ">=14.0.0"
},
"devDependencies": {
"@litert/mime": "^0.1.1",
"@litert/mime": "^0.1.3",
"@types/node": "^20.1.4",
"typescript": "^5.0.4"
}
Expand Down
2 changes: 1 addition & 1 deletion test/index-npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>@litert/mime.js test</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=../dist/test-browser2&npm={'@litert/mime':'0.1.2'}"></script>
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=../dist/test-browser2&npm={'@litert/mime':'0.1.3'}"></script>
<style>
*{font-family:Consolas,"Courier New",Courier,FreeMono,monospace;line-height: 1.5;font-size:12px;box-sizing:border-box;}
pre{background-color:rgba(0,0,0,.05);padding:10px;}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"sourceMap": false,
"target": "ES2021",
"strict": true, // 严格模式
"declaration": false, // d.ts
"declaration": true, // d.ts
"declarationMap": false,
"newLine": "LF",
"resolveJsonModule": true,
Expand Down

0 comments on commit 4053225

Please sign in to comment.