Skip to content

Commit d590284

Browse files
committed
chore: init project
0 parents  commit d590284

File tree

10 files changed

+2592
-0
lines changed

10 files changed

+2592
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.cache
2+
.DS_Store
3+
.idea
4+
*.log
5+
*.tgz
6+
coverage
7+
dist
8+
lib-cov
9+
logs
10+
node_modules
11+
temp

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# axios-plugin-uniapp
2+
3+
this plugin is Axios adapter for uniapp
4+
5+
English | [简体中文](./README.zh-CN.md)
6+
7+
## Installation
8+
9+
```
10+
pnpm i axios-plugin-uniapp
11+
```
12+
13+
## Usage
14+
15+
```ts
16+
import axios from "axios";
17+
import { uniappAdapter } from "axios-plugin-uniapp";
18+
19+
const $axios = axios.create({
20+
adapter: uniappAdapter,
21+
});
22+
```

README.zh-CN.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# axios-plugin-uniapp
2+
3+
此插件是用于 uniapp 的 Axios 适配器
4+
5+
[English](./README.md) | 简体中文
6+
7+
## 安装
8+
9+
```
10+
pnpm i axios-plugin-uniapp
11+
```
12+
13+
## 使用
14+
15+
```ts
16+
import axios from "axios";
17+
import { uniappAdapter } from "axios-plugin-uniapp";
18+
19+
const $axios = axios.create({
20+
adapter: uniappAdapter,
21+
});
22+
```

build.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
entries: ['src/index'],
5+
declaration: true,
6+
clean: true,
7+
rollup: {
8+
emitCJS: true,
9+
},
10+
})

package.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "axios-plugin-uniapp",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"license": "MIT",
6+
"packageManager": "[email protected]",
7+
"description": "The Axios adapter for uniapp",
8+
"homepage": "https://github.com/KeJunMao/axios-plugin-uniapp",
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/KeJunMao/axios-plugin-uniapp.git"
12+
},
13+
"keywords": [
14+
"uniapp",
15+
"axios",
16+
"uni-app",
17+
"axiosAdapter"
18+
],
19+
"sideEffects": false,
20+
"exports": {
21+
".": {
22+
"types": "./dist/index.d.ts",
23+
"require": "./dist/index.cjs",
24+
"import": "./dist/index.mjs"
25+
}
26+
},
27+
"main": "./dist/index.mjs",
28+
"module": "./dist/index.mjs",
29+
"types": "./dist/index.d.ts",
30+
"typesVersions": {
31+
"*": {
32+
"*": [
33+
"./dist/*",
34+
"./dist/index.d.ts"
35+
]
36+
}
37+
},
38+
"files": [
39+
"dist"
40+
],
41+
"scripts": {
42+
"build": "unbuild",
43+
"dev": "unbuild --stub",
44+
"start": "esno src/index.ts",
45+
"prepublishOnly": "nr build",
46+
"release": "bumpp && npm publish",
47+
"test": "vitest",
48+
"typecheck": "tsc --noEmit"
49+
},
50+
"devDependencies": {
51+
"@dcloudio/types": "^3.0.15",
52+
"@types/node": "^18.7.21",
53+
"bumpp": "^8.2.1",
54+
"eslint": "^8.24.0",
55+
"esno": "^0.16.3",
56+
"pnpm": "^7.12.2",
57+
"rimraf": "^3.0.2",
58+
"typescript": "^4.8.3",
59+
"unbuild": "^0.8.11",
60+
"vite": "^3.1.3",
61+
"vitest": "^0.24.0"
62+
},
63+
"dependencies": {
64+
"axios": "^0.27.2"
65+
}
66+
}

0 commit comments

Comments
 (0)