mocker-api
Advanced tools
Comparing version 1.6.4 to 1.6.5
{ | ||
"name": "mocker-api", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"description": "This is dev support mock RESTful API.", | ||
@@ -19,2 +19,3 @@ "bin": { | ||
"webpack-dev-server", | ||
"webpack-api-mocker", | ||
"webpack", | ||
@@ -21,0 +22,0 @@ "mocker-api", |
@@ -1,6 +0,8 @@ | ||
webpack-api-mocker | ||
mocker-api | ||
--- | ||
webpack-api-mocker is a [webpack-dev-server](https://github.com/webpack/webpack-dev-server) middleware that creates mocks for REST APIs. It will be helpful when you try to test your application without the actual REST API server. | ||
`mocker-api` that creates mocks for REST APIs. It will be helpful when you try to test your application without the actual REST API server. | ||
> ⚠️ [`webpack-api-mocker`](https://github.com/jaywcjlove/webpack-api-mocker/tree/webpack-api-mocker) has become powerful and can be used independently of webpack. **This is its new name [`mocker-api`](https://npm.im/mocker-api).** [`webpack-api-mocker`](https://github.com/jaywcjlove/webpack-api-mocker/tree/webpack-api-mocker) can still be used, New content will be posted on [**`mocker-api`**](https://npm.im/mocker-api). | ||
**Features:** | ||
@@ -16,3 +18,3 @@ | ||
```bash | ||
npm install webpack-api-mocker --save-dev | ||
npm install mocker-api --save-dev | ||
``` | ||
@@ -115,3 +117,3 @@ | ||
```js | ||
const delay = require('webpack-api-mocker/utils/delay'); | ||
const delay = require('mocker-api/utils/delay'); | ||
const noProxy = process.env.NO_PROXY === 'true'; | ||
@@ -152,3 +154,3 @@ | ||
>⚠️ Not dependent on [webpack](https://github.com/webpack/webpack) and [webpack-dev-server](https://github.com/webpack/webpack-dev-server). | ||
>⚠️ The `webpack-api-mocker@1.6.4+` support. | ||
>⚠️ The `mocker-api@1.6.4+` support. | ||
@@ -171,3 +173,3 @@ ```bash | ||
"devDependencies": { | ||
+ "webpack-api-mocker": "^1.6.4" | ||
+ "mocker-api": "^1.6.4" | ||
}, | ||
@@ -187,3 +189,3 @@ "license": "MIT" | ||
+ const path = require('path'); | ||
+ const apiMocker = require('webpack-api-mocker'); | ||
+ const apiMocker = require('mocker-api'); | ||
@@ -207,3 +209,3 @@ const app = express(); | ||
+ const path = require('path'); | ||
+ const apiMocker = require('webpack-api-mocker'); | ||
+ const apiMocker = require('mocker-api'); | ||
@@ -210,0 +212,0 @@ module.exports = { |
16629
274