Skip to content

Commit c9dad3c

Browse files
committed
feat: update module (typescript rewrite)
1 parent 2bd521b commit c9dad3c

File tree

21 files changed

+3608
-3326
lines changed

21 files changed

+3608
-3326
lines changed

.circleci/config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
# Common
21
node_modules
32
dist
43
.nuxt
54
coverage
6-
7-
# Plugin
8-
lib/plugin.js

.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"@nuxtjs/eslint-config-typescript"
4+
]
5+
}

.eslintrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
ci:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
node: [14]
19+
20+
steps:
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node }}
24+
25+
- name: checkout
26+
uses: actions/checkout@master
27+
28+
- name: cache node_modules
29+
uses: actions/cache@v2
30+
with:
31+
path: node_modules
32+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
33+
34+
- name: Install dependencies
35+
if: steps.cache.outputs.cache-hit != 'true'
36+
run: yarn
37+
38+
- name: Lint
39+
run: yarn lint
40+
41+
- name: Test
42+
run: yarn jest
43+
44+
- name: Coverage
45+
uses: codecov/codecov-action@v1

README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
[![npm version][npm-version-src]][npm-version-href]
44
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5-
[![Circle CI][circle-ci-src]][circle-ci-href]
6-
[![Codecov][codecov-src]][codecov-href]
7-
[![License][license-src]][license-href]
5+
[![codecov][codecov-src]][codecov-href]
6+
[![license][license-src]][license-href]
87

9-
> The one-liner node.js http-proxy middleware solution for Nuxt.js using [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware)
8+
> Proxy support for nuxt server
109
1110
[📖 **Release Notes**](./CHANGELOG.md)
1211

13-
✨ Do you know that [Axios Module](https://github.com/nuxt-community/axios-module) has built in support for Proxy Module?
14-
1512
## Features
1613

1714
✓ Path rewrites
@@ -24,7 +21,7 @@
2421

2522
✓ Auth / Cookie
2623

27-
✓ ...and more! (see [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) docs)
24+
✓ ...See [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) docs
2825

2926
⚠ Does not work in generated/static mode!
3027

@@ -62,9 +59,9 @@ yarn add @nuxtjs/proxy # or npm install @nuxtjs/proxy
6259

6360
You can provide proxy config using either object or array.
6461

65-
### Array mode
62+
### Array Config
6663

67-
You can use magic [shorthands](https://github.com/chimurai/http-proxy-middleware#shorthand)
64+
You can use [shorthand syntax](https://github.com/chimurai/http-proxy-middleware#shorthand) to configure proxy:
6865

6966
```js
7067
{
@@ -81,7 +78,7 @@ You can use magic [shorthands](https://github.com/chimurai/http-proxy-middleware
8178
}
8279
```
8380

84-
### Object mode
81+
### Object Config
8582

8683
Keys are [context](https://github.com/chimurai/http-proxy-middleware#context-matching)
8784

@@ -122,9 +119,6 @@ Copyright (c) Nuxt Community
122119
[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxtjs/proxy.svg?style=flat-square
123120
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/proxy
124121

125-
[circle-ci-src]: https://img.shields.io/circleci/project/github/nuxt-community/proxy-module.svg?style=flat-square
126-
[circle-ci-href]: https://circleci.com/gh/nuxt-community/proxy-module
127-
128122
[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/proxy-module.svg?style=flat-square
129123
[codecov-href]: https://codecov.io/gh/nuxt-community/proxy-module
130124

commitlint.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

husky.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

jest.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
module.exports = {
2-
testEnvironment: 'node',
3-
collectCoverage: true,
4-
collectCoverageFrom: [
5-
'lib/**/*.js',
6-
'!lib/plugin.js'
7-
]
2+
preset: '@nuxt/test-utils'
83
}

0 commit comments

Comments
 (0)