Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roshan-labs/http
Nuxt3 $fetch 请求封装
https://github.com/roshan-labs/http
fetch http nuxt nuxt-module
Last synced: about 1 month ago
JSON representation
Nuxt3 $fetch 请求封装
- Host: GitHub
- URL: https://github.com/roshan-labs/http
- Owner: roshan-labs
- Created: 2023-10-18T13:58:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-31T07:07:41.000Z (11 months ago)
- Last Synced: 2024-01-31T08:27:16.294Z (11 months ago)
- Topics: fetch, http, nuxt, nuxt-module
- Language: TypeScript
- Homepage:
- Size: 282 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# 🔀 @roshan-labs/http
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]对 Nuxt $fetch 的封装,统一请求配置
- [✨ Release Notes](/CHANGELOG.md)
## 使用
1. 添加 `@roshan-labs/http` 到项目中
```bash
# 使用 pnpm
pnpm add -D @roshan-labs/http# 使用 yarn
yarn add --dev @roshan-labs/http# 使用 npm
npm install --save-dev @roshan-labs/http
```2. 把 `@roshan-labs/http` 添加进 `nuxt.config.ts` 中 `modules` 选项中
```js
export default defineNuxtConfig({
modules: [
'@roshan-labs/http'
],
})
```现在你可以在项目中使用此模块了 ✨
## 选项
## 开发
```bash
# 安装依赖
npm install# 构建垫片
npm run dev:prepare# 运行演练场模式
npm run dev# 构建演练场模式
npm run dev:build# 运行代码检查
npm run lint# 运行测试
npm run test
npm run test:watch# 发布
npm run release
```## License
MIT
[npm-version-src]: https://img.shields.io/npm/v/@roshan-labs/http/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://www.npmjs.com/package/@roshan-labs/http[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://www.npmjs.com/package/@roshan-labs/http[license-src]: https://img.shields.io/npm/l/@roshan-labs/http.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://www.npmjs.com/package/@roshan-labs/http[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com