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
> You may encounter issues on a second or third install of dependencies. If this happens, install with `npm i --no-cache --force` to fix these issues.
77
+
75
78
### Running the Project
76
79
77
-
When running locally, the UI must be built before the CLI can be run.
80
+
When running locally, the shared libraries and the UI must be built before the CLI can be run.
78
81
79
-
To build the UI:
82
+
To build them:
80
83
81
84
```bash
82
85
$ npm run build
83
86
```
84
87
85
-
To run the CLI:
88
+
Next, we want to run the CLI and the UI with hot reload. You will need two terminal windows for this.
89
+
90
+
1. In the first terminal, run the CLI. This command should be run in the `napi` directory with a `workdir` pointing to the project you want to work on. For example, if you want to work on Apache Airflow, run:
86
91
87
92
```bash
88
-
$ npm start
93
+
$ npm run dev:cli -- audit view -- --workdir=/path/to/airflow
89
94
```
90
95
91
96
Running the `audit view` command from the CLI will spin up a web server on your localhost. You can access the UI by navigating to `http://localhost:3000`.
92
97
93
-
> **Note:** In case of port collisions, the UI will automatically switch to the next available port.
98
+
> [!NOTE]
99
+
> In case of port collisions, the UI will automatically switch to the next available port.
100
+
101
+
2. In the second terminal, run the UI. This command should be run in the `napi` directory as well:
102
+
103
+
```bash
104
+
$ npm run dev:app
105
+
```
106
+
107
+
This controls the hot reload functionality for the UI. You can now make changes to the UI and see them reflected in real-time.
108
+
109
+
> [!IMPORTANT]
110
+
> The react UI elements (sidebar, header, etc.) will automatically reload when you make changes. However any Cytoscape elements will not. You will need to refresh the page to see those changes.
2. From the `napi` repo initialize the project using the CLI:
122
+
2. From the `napi` repo initialize the project using the CLI, which will create a `.napirc` file in the project root. This file contains the configuration for the project and is required for the CLI to work.:
106
123
```bash
107
124
cd /path/to/napi # or just use a different terminal
108
125
npm start -- init -- --workdir=/path/to/airflow
109
126
```
110
127
111
-
3. This will create a `.napirc` file in root of the project. The file should look like the following. You can copy this content into the file and overwrite it if you are having issues.
5. The audit view will be available at `http://localhost:3000` and should automatically open in your default browser.
128
+
> [!NOTE]
129
+
> If you encounter any issues with the config file, you can [check the reference for the file on our documentation](https://docs.nanoapi.io/default-guide/reference/napirc).
133
130
134
131
### Testing
135
132
@@ -153,6 +150,14 @@ To ensure releases run smoothly, put the content of your changes in our [CHANGEL
153
150
154
151
We are also building on the documentation process. For now, include any documentation changes in your PRs and we will add them into the main documentation.
155
152
153
+
The critical documentation to maintain is for any changes that impact the following:
154
+
- CLI commands
155
+
- Configuration file
156
+
- Local development setup
157
+
- Release process
158
+
- Testing
159
+
- Linting
160
+
156
161
### Discussions vs Issues
157
162
158
163
We use GitHub Discussions for general questions, ideas, and feedback. If you have a question, please use the Discussions tab. If you have a bug report or feature request, please use the Issues tab.
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,9 @@ For the latest updates, visit our [project board](/projects).
46
46
47
47
## Installation
48
48
49
+
> [!IMPORTANT]
50
+
> `napi` works out of the box on both mac and linux systems. To use this tool on Windows, you will need to install [WSL (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/install) and run the CLI commands from there.
0 commit comments