Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 请求封装

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