File tree Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,30 @@ Then install it via:
23
23
npm install swagger_petstore --save
24
24
```
25
25
26
+ ##### Local development
27
+
28
+ To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
29
+ into the directory containing ` package.json ` (and this README). Let's call this ` JAVASCRIPT_CLIENT_DIR ` . Then run:
30
+
31
+ ``` shell
32
+ npm install
33
+ ```
34
+
35
+ Next, [ link] ( https://docs.npmjs.com/cli/link ) it globally in npm with the following, also from ` JAVASCRIPT_CLIENT_DIR ` :
36
+
37
+ ``` shell
38
+ npm link
39
+ ```
40
+
41
+ Finally, switch to the directory you want to use your swagger_petstore from, and run:
42
+
43
+ ``` shell
44
+ npm link /path/to/< JAVASCRIPT_CLIENT_DIR>
45
+ ```
46
+
47
+ You should now be able to ` require('swagger_petstore') ` in javascript files from the directory you ran the last
48
+ command above from.
49
+
26
50
#### git
27
51
#
28
52
If the library is hosted at a git repository, e.g.
@@ -37,7 +61,8 @@ then install it via:
37
61
38
62
The library also works in the browser environment via npm and [ browserify] ( http://browserify.org/ ) . After following
39
63
the above steps with Node.js and installing browserify with ` npm install -g browserify ` ,
40
- perform the following (assuming * main.js* is your entry file):
64
+ perform the following (assuming * main.js* is your entry file, that's to say your javascript file where you actually
65
+ use this library):
41
66
42
67
``` shell
43
68
browserify main.js > bundle.js
Original file line number Diff line number Diff line change @@ -23,6 +23,30 @@ Then install it via:
23
23
npm install swagger_petstore --save
24
24
```
25
25
26
+ ##### Local development
27
+
28
+ To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
29
+ into the directory containing ` package.json ` (and this README). Let's call this ` JAVASCRIPT_CLIENT_DIR ` . Then run:
30
+
31
+ ``` shell
32
+ npm install
33
+ ```
34
+
35
+ Next, [ link] ( https://docs.npmjs.com/cli/link ) it globally in npm with the following, also from ` JAVASCRIPT_CLIENT_DIR ` :
36
+
37
+ ``` shell
38
+ npm link
39
+ ```
40
+
41
+ Finally, switch to the directory you want to use your swagger_petstore from, and run:
42
+
43
+ ``` shell
44
+ npm link /path/to/< JAVASCRIPT_CLIENT_DIR>
45
+ ```
46
+
47
+ You should now be able to ` require('swagger_petstore') ` in javascript files from the directory you ran the last
48
+ command above from.
49
+
26
50
#### git
27
51
#
28
52
If the library is hosted at a git repository, e.g.
@@ -37,7 +61,8 @@ then install it via:
37
61
38
62
The library also works in the browser environment via npm and [ browserify] ( http://browserify.org/ ) . After following
39
63
the above steps with Node.js and installing browserify with ` npm install -g browserify ` ,
40
- perform the following (assuming * main.js* is your entry file):
64
+ perform the following (assuming * main.js* is your entry file, that's to say your javascript file where you actually
65
+ use this library):
41
66
42
67
``` shell
43
68
browserify main.js > bundle.js
You can’t perform that action at this time.
0 commit comments