You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-36Lines changed: 10 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,49 +32,23 @@ These prerequisites are required both for installing SwaggerEditor as a npm pack
32
32
### Installation
33
33
34
34
Assuming [prerequisites](#prerequisites) are already installed, SwaggerEditor npm package is installable and works with `Node.js >= 12.22.0`.
35
-
SwaggerEditor npm package is currently hosted on [GitHub packages registry](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages).
36
-
37
-
You can authenticate to GitHub Packages with npm by either editing your per-user *~/.npmrc*
38
-
file to include your personal access token (classic) or by logging in to npm on the command line using your username and personal access token.
39
-
40
-
To authenticate by adding your personal access token (classic) to your *~/.npmrc* file,
41
-
edit the *~/.npmrc* file for your project to include the following line,
42
-
replacing TOKEN with your personal access token. Create a new *~/.npmrc* file if one doesn't exist.
43
-
You can find more information about authenticating to GitHub Packages in [GitHub documentation](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages).
44
-
45
-
Last step is to include a line to the *.npmrc* file, specifying GitHub Packages URL and the namespace *(@swagger-api)* where the package is hosted.
46
-
47
-
```
48
-
@swagger-api:registry=https://npm.pkg.github.com
49
-
//npm.pkg.github.com/:_authToken=TOKEN
50
-
```
51
-
52
-
You can now install SwaggerEditor package using `npm`:
35
+
You can install SwaggerEditor via [npm CLI](https://docs.npmjs.com/cli) by running the following command:
53
36
54
37
```sh
55
-
$ npm install @swagger-api/swagger-editor
38
+
$ npm install swagger-editor@>=5
56
39
````
57
40
58
-
For more information about installing npm packages from GitHub packages registry please visit [Installing a package](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package)
59
-
section in GitHub documentation.
60
-
61
41
### Usage
62
42
63
-
Install the package:
64
-
65
-
```sh
66
-
$ npm install @swagger-api/swagger-editor
67
-
````
68
-
69
43
Use the package in you application:
70
44
71
45
**index.js**:
72
46
73
47
```js
74
48
import React from 'react';
75
49
import ReactDOM from 'react-dom';
76
-
import SwaggerEditor from '@swagger-api/swagger-editor';
@@ -452,7 +426,7 @@ It's bundled with React defined as external. This allows consumer to use his own
452
426
453
427
**npm**
454
428
455
-
SwaggerEditor is released as `@swagger-api/swagger-editor` npm package on [GitHub packages registry](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages).
429
+
SwaggerEditor is released as `swagger-editor@5` npm package on [npmjs.com](https://npmjs.com).
456
430
Package can also be produced manually by running following commands (assuming you're already followed [setting up](#setting-up) steps):
457
431
458
432
```sh
@@ -527,7 +501,7 @@ import React from 'react';
527
501
import ReactDOM from 'react-dom';
528
502
import SwaggerUI from 'swagger-ui-react';
529
503
import 'swagger-ui-react/swagger-ui.css';
530
-
import SwaggerEditor from '@swagger-api/swagger-editor';
0 commit comments