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
-[emscripten](https://emscripten.org/docs/getting_started/downloads.html) or [docker](https://www.docker.com/) needs to be installed, we recommend going with a docker option
30
+
31
+
23
32
### Installation
24
33
25
-
SwaggerEditor is currently hosted on [GitHub packages registry](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages).
26
-
For installing SwaggerEditor npm package from GitHub packages registry, create `.npmrc` file in your current directory and add
27
-
the following line to it:
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.
28
46
29
47
```
30
48
@swagger-api:registry=https://npm.pkg.github.com
49
+
//npm.pkg.github.com/:_authToken=TOKEN
31
50
```
32
51
33
-
#### Prerequisites
34
-
35
-
Using [Node.js](https://nodejs.org/)[active LTS version](https://nodejs.org/en/about/releases/) is recommended.
36
-
[node-gyp](https://www.npmjs.com/package/node-gyp) is used to build some fragments that require [Python 3.x](https://www.python.org/downloads/).
37
-
[emscripten](https://emscripten.org/docs/getting_started/downloads.html) or [docker](https://www.docker.com/) needs to be installed
38
-
on your operating system as well. We strongly recommend going with a docker option.
39
-
40
52
You can now install SwaggerEditor package using `npm`:
41
53
42
54
```sh
43
55
$ npm install @swagger-api/swagger-editor
44
56
````
45
57
46
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)
47
-
section intheir documentation.
59
+
section inGitHub documentation.
48
60
49
61
### Usage
50
62
@@ -80,7 +92,7 @@ self.MonacoEnvironment = {
80
92
* `apidom.worker.js` on https://example.com/dist/apidom.worker.js and
81
93
* `editor.worker` on https://example.com/dist/editor.worker.js.
[Node.js](https://nodejs.org/) >= 16.13.0 and `npm >= 8.1.0` are the minimum required versions that this repo runs on.
256
-
We recommend using the latest version of Node.js@16 though. We're using [node-gyp](https://www.npmjs.com/package/node-gyp) to build some fragments that require [Python 3.x](https://www.python.org/downloads/).
257
-
[emscripten](https://emscripten.org/docs/getting_started/downloads.html) or [docker](https://www.docker.com/) needs to be installed
258
-
on your operating system. We strongly recommend going with a docker option.
267
+
Assuming [prerequisites](#prerequisites) are already installed, [Node.js](https://nodejs.org/) `>=16.13.0` and `npm >=8.1.0`
268
+
are the minimum required versions that this repo runs on, but we recommend using the latest version of Node.js@16
259
269
260
270
### Setting up
261
271
@@ -269,15 +279,19 @@ will automatically pick the right Node.js version for you:
269
279
This repository is using npm packages from [https://www.npmjs.com/](npmjs.com) and [GitHub packages registry](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages).
270
280
To successfully install npm packages that SwaggerEditor requires, you need to [Authenticate to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages).
271
281
282
+
You can authenticate to GitHub Packages with npm by either editing your per-user *~/.npmrc*
283
+
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.
272
284
273
-
We recommend that you [authenticate using GitHub PAT (Personal Access Token)](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token).
274
-
275
-
**Create a new ~/.npmrc file if one doesn't exist.**
285
+
To authenticate by adding your personal access token (classic) to your *~/.npmrc* file,
286
+
edit the *~/.npmrc* file for your project to include the following line,
287
+
replacing TOKEN with your personal access token. Create a new *~/.npmrc* file if one doesn't exist.
288
+
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).
276
289
277
-
```sh
290
+
```
278
291
//npm.pkg.github.com/:_authToken=TOKEN
279
292
```
280
293
294
+
281
295
Alternatively, to authenticate by logging in to npm, use the `npm login` command,
282
296
replacing USERNAME with your GitHub username, TOKEN with your personal access token (classic),
With the combination of MacOS and Node.js 16, there is a known compatibility issue of installing and building the `tree-sitter` dependency. The workaround is to globally install `>[email protected]` (for lerna/apidom monorepo) but use Node.js 14 to install/build tree-sitter.
305
-
Although the prerequisite is to use [email protected], at this point we don't rely on any specific feature from Node.js 16.13 (except for`>[email protected]`).
306
-
307
-
```sh
308
-
$ npm install -g npm
309
-
$ npm --version
310
-
```
311
-
312
-
Assuming we are using [nvm](https://github.com/nvm-sh/nvm) to manage Node versions:
0 commit comments