Skip to content

Commit 70e9ca0

Browse files
authored
docs: update installation notes (#98)
* docs(editor): update installation notes and add docker notes * chore(editor): update ga workflow filename
1 parent 02cbbf4 commit 70e9ca0

File tree

2 files changed

+50
-7
lines changed

2 files changed

+50
-7
lines changed

.github/workflows/apidom-editor.yml renamed to .github/workflows/swagger-ide.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: ApiDOM Editor
4+
name: Swagger IDE
55

66
on:
77
push:

README.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ApiDOM editor home
1+
# Swagger IDE
22

33
App will load with Monaco, Topbar, Swagger-UI (react).
44

@@ -8,16 +8,29 @@ refer `docs/swagger-client.md` for some notes
88

99
Webpack and development setup based on Create React App (ejected)
1010

11+
## Prerequisites
12+
```
13+
"node": "~16.8",
14+
"npm": ">=7.21.0"
15+
```
16+
17+
- if using MacOS, please refer to additional installation notes below
18+
- ApiDOM monorepo requires the use of `npm>=7.21.0`
19+
1120
## Install
1221

1322
After cloning run the following commands to init and update `apidom` submodule
1423

15-
```
16-
git submodule init
17-
git submodule update
24+
```sh
25+
$ git submodule init
26+
$ git submodule update
1827
```
1928

20-
- (To update apidom submodule to latest commit, issue `git submodule update --recursive --remote`)
29+
To update apidom submodule to latest commit, issue the following command:
30+
31+
```sh
32+
$ git submodule update --recursive --remote
33+
```
2134

2235
Change directory to `apidom` monorepo and run following commands:
2336

@@ -28,7 +41,7 @@ Change directory to `apidom` monorepo and run following commands:
2841

2942
Now change to root directory and run the following commands
3043

31-
```shell script
44+
```sh
3245
$ npm i
3346
$ npm start
3447
```
@@ -37,6 +50,25 @@ Edit files in `./src` directory
3750

3851
The default development port is `port=3000`. If a port is already in use, `npm start` will increment the port.
3952

53+
### MacOS Install notes
54+
55+
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 `npm@7` (for lerna/apidom monorepo) but use Node.js 14 to install/build tree-sitter.
56+
57+
Although the prerequisite is to use [email protected], at this point we don't rely on any specific feature from Node.js 16 (except for `npm@7`).
58+
59+
```sh
60+
$ npm install -g npm
61+
$ npm --version
62+
```
63+
64+
Assuming we are using `NVM` to manage Node versions,
65+
66+
```sh
67+
$ nvm use v14
68+
```
69+
70+
Then follow the installation steps above
71+
4072
## Test
4173

4274
Both Jest and Cypress include `@testing-library` plugin support.
@@ -102,3 +134,14 @@ This script will build and serve a gzipped static build at `localhost:3050`.
102134
$ npm run build
103135
$ npm run serve-static-build
104136
```
137+
138+
## Docker
139+
Once we build the app, we can also build and run a Docker container.
140+
141+
```sh
142+
$ docker build . -t {{label}}
143+
$ docker run -p 8080:80 {{label}}
144+
```
145+
146+
- {{label}} can be any descriptive string, e.g. `user/myapp-1`
147+
- open browser at `localhost:8080`

0 commit comments

Comments
 (0)