[Documentation] Add instructions to build the javascript client module (#2806)

* Add instructions to build the module

* Updated samples
This commit is contained in:
Jonas DOREL 2019-05-05 11:32:05 +02:00 committed by William Cheng
parent 92eacdfda9
commit f2f12b9e04
3 changed files with 96 additions and 0 deletions

View File

@ -30,6 +30,38 @@ Then install it via:
npm install {{{projectName}}} --save npm install {{{projectName}}} --save
``` ```
Finaly, you need to build the module:
```shell
npm run build
```
##### Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
```shell
npm install
```
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
```shell
npm link
```
To use the link you just defined in your project, switch to the directory you want to use your {{{projectName}}} from, and run:
```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finaly, you need to build the module:
```shell
npm run build
```
#### git #### git
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}} 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}}

View File

@ -22,6 +22,38 @@ Then install it via:
npm install open_api_petstore --save npm install open_api_petstore --save
``` ```
Finaly, you need to build the module:
```shell
npm run build
```
##### Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
```shell
npm install
```
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
```shell
npm link
```
To use the link you just defined in your project, switch to the directory you want to use your open_api_petstore from, and run:
```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finaly, you need to build the module:
```shell
npm run build
```
#### git #### git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID

View File

@ -22,6 +22,38 @@ Then install it via:
npm install open_api_petstore --save npm install open_api_petstore --save
``` ```
Finaly, you need to build the module:
```shell
npm run build
```
##### Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
```shell
npm install
```
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
```shell
npm link
```
To use the link you just defined in your project, switch to the directory you want to use your open_api_petstore from, and run:
```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```
Finaly, you need to build the module:
```shell
npm run build
```
#### git #### git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID