File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
modules/swagger-codegen/src/main/resources/Javascript Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,30 @@ Then install it via:
31
31
npm install { {{projectName} }} --save
32
32
```
33
33
34
+ ##### Local development
35
+
36
+ To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
37
+ into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
38
+
39
+ ```shell
40
+ npm install
41
+ ```
42
+
43
+ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
44
+
45
+ ```shell
46
+ npm link
47
+ ```
48
+
49
+ Finally, switch to the directory you want to use your { {{projectName} }} from, and run:
50
+
51
+ ```shell
52
+ npm link /path/to/<JAVASCRIPT _CLIENT_DIR >
53
+ ```
54
+
55
+ You should now be able to `require('{ {{projectName} }}')` in javascript files from the directory you ran the last
56
+ command above from.
57
+
34
58
#### git
35
59
#
36
60
If the library is hosted at a git repository, e.g.
@@ -45,7 +69,8 @@ then install it via:
45
69
46
70
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
47
71
the above steps with Node.js and installing browserify with `npm install -g browserify`,
48
- perform the following (assuming *main.js* is your entry file):
72
+ perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually
73
+ use this library):
49
74
50
75
```shell
51
76
browserify main.js > bundle.js
You can’t perform that action at this time.
0 commit comments