Revert "[javascript] Added README section for Webpack configuration (closes #3466) (#5767)" (#5770)

This reverts commit 54f5d73ee2.
This commit is contained in:
wing328 2017-06-04 16:52:50 +08:00 committed by GitHub
parent 54f5d73ee2
commit 879149bb69
6 changed files with 6 additions and 156 deletions

View File

@ -32,7 +32,7 @@ npm install {{{projectName}}} --save
``` ```
#### git #### git
#
If the library is hosted at a git repository, e.g. If the library is hosted at a git repository, e.g.
https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}}
then install it via: then install it via:
@ -103,31 +103,6 @@ api.{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{#vendorExtensi
{{/usePromises}}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} {{/usePromises}}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
``` ```
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader:
1. Add `imports-loader` package:
```bash
npm install --save-dev imports-loader
```
2. Add the following sections to your webpack config (replace `MY_API_CLIENT_NAME` with your module name):
```javascript
module: {
rules: [
{
test: /MY_API_CLIENT_NAME[\/\\]+.*\.js$/,
use: 'imports-loader?define=>false'
}
]
},
node: {
fs: 'empty'
}
```
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*

View File

@ -32,7 +32,7 @@ npm install {{{projectName}}} --save
``` ```
#### git #### git
#
If the library is hosted at a git repository, e.g. If the library is hosted at a git repository, e.g.
https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}}
then install it via: then install it via:
@ -103,31 +103,6 @@ api.{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{#vendorExtensi
{{/usePromises}}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} {{/usePromises}}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
``` ```
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader:
1. Add `imports-loader` package:
```bash
npm install --save-dev imports-loader
```
2. Add the following sections to your webpack config (replace `MY_API_CLIENT_NAME` with your module name):
```javascript
module: {
rules: [
{
test: /MY_API_CLIENT_NAME[\/\\]+.*\.js$/,
use: 'imports-loader?define=>false'
}
]
},
node: {
fs: 'empty'
}
```
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*

View File

@ -24,7 +24,7 @@ npm install swagger_petstore --save
``` ```
#### git #### git
#
If the library is hosted at a git repository, e.g. If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via: then install it via:
@ -69,31 +69,6 @@ api.fakeOuterBooleanSerialize(opts, callback);
``` ```
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader:
1. Add `imports-loader` package:
```bash
npm install --save-dev imports-loader
```
2. Add the following sections to your webpack config (replace `MY_API_CLIENT_NAME` with your module name):
```javascript
module: {
rules: [
{
test: /MY_API_CLIENT_NAME[\/\\]+.*\.js$/,
use: 'imports-loader?define=>false'
}
]
},
node: {
fs: 'empty'
}
```
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*

View File

@ -24,7 +24,7 @@ npm install swagger_petstore --save
``` ```
#### git #### git
#
If the library is hosted at a git repository, e.g. If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via: then install it via:
@ -66,31 +66,6 @@ api.fakeOuterBooleanSerialize(opts).then(function(data) {
``` ```
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader:
1. Add `imports-loader` package:
```bash
npm install --save-dev imports-loader
```
2. Add the following sections to your webpack config (replace `MY_API_CLIENT_NAME` with your module name):
```javascript
module: {
rules: [
{
test: /MY_API_CLIENT_NAME[\/\\]+.*\.js$/,
use: 'imports-loader?define=>false'
}
]
},
node: {
fs: 'empty'
}
```
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*

View File

@ -24,7 +24,7 @@ npm install swagger_petstore --save
``` ```
#### git #### git
#
If the library is hosted at a git repository, e.g. If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via: then install it via:
@ -66,31 +66,6 @@ api.fakeOuterBooleanSerialize(opts).then(function(data) {
``` ```
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader:
1. Add `imports-loader` package:
```bash
npm install --save-dev imports-loader
```
2. Add the following sections to your webpack config (replace `MY_API_CLIENT_NAME` with your module name):
```javascript
module: {
rules: [
{
test: /MY_API_CLIENT_NAME[\/\\]+.*\.js$/,
use: 'imports-loader?define=>false'
}
]
},
node: {
fs: 'empty'
}
```
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*

View File

@ -24,7 +24,7 @@ npm install swagger_petstore --save
``` ```
#### git #### git
#
If the library is hosted at a git repository, e.g. If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via: then install it via:
@ -69,31 +69,6 @@ api.fakeOuterBooleanSerialize(opts, callback);
``` ```
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader:
1. Add `imports-loader` package:
```bash
npm install --save-dev imports-loader
```
2. Add the following sections to your webpack config (replace `MY_API_CLIENT_NAME` with your module name):
```javascript
module: {
rules: [
{
test: /MY_API_CLIENT_NAME[\/\\]+.*\.js$/,
use: 'imports-loader?define=>false'
}
]
},
node: {
fs: 'empty'
}
```
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*