Skip to content

Commit 709ea98

Browse files
authored
Update build instructions (#2681)
1 parent 4938948 commit 709ea98

2 files changed

Lines changed: 20 additions & 66 deletions

File tree

docs/setup.md

Lines changed: 19 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,59 @@
11
# Setup your environment
22

3-
The following are instructions for building and running Batch Explorer and the Shared Libraries in a development environment.
3+
The following are instructions for building and running Batch Explorer in a development environment.
44

55
1. Install dependencies:
66

77
```shell
8-
npm run dev-setup
98
npm install
10-
pip3 install -r python/requirements.txt
9+
npm run dev-setup
10+
pip install -r python/requirements.txt
1111
```
1212

13-
2. Build the libraries:
13+
2. Build the repository:
1414

1515
```shell
1616
npm run build
1717
```
1818

19-
## Running Batch Shared Libraries Web
19+
## Running Batch Explorer Desktop Application
2020

2121
```shell
22-
npm run start:web
22+
npm run launch:desktop # Open the dev server, Electron app and all packages in watch mode
2323
```
2424

25-
## Running Batch Explorer Desktop
25+
This command will enable hot reload for a better development experience. Simply saving a file will cause the UI to refresh with your changes.
2626

27-
```shell
28-
npm run dev-server # Start the dev server (in one shell)
29-
npm run dev-electron # Start Electron (in another shell)
30-
```
31-
32-
The dev-server and dev-electron support hot reload for a better development experience. Simply saving a file will cause the UI to refresh to your updated changes.
33-
34-
*Note:* Changes to any files in the node client directory ('src/client') require restarting the application.
27+
*Note:* Changes to any files in the node client directory ('desktop/src/client') require restarting the application.
3528

3629
Please also take a look at the [coding guidelines](coding-guidelines.md) for this repo for best practices.
3730

3831
## Editor
3932

4033
If you're using VSCode (recommended) we suggest you use the following extensions:
4134
42-
* EditorConfig for VS Code (Important)
35+
* EditorConfig
4336
* ESLint
44-
* Debugger for Chrome
45-
46-
## Detailed commands
47-
48-
**Magic command** (starts the server and electron in dev mode)
37+
* Prettier
38+
* Markdownlint
39+
* Stylelint
4940
50-
```shell
51-
npm run dev
52-
```
53-
54-
Build project
55-
56-
```shell
57-
npm run build
58-
```
59-
60-
Run app
61-
62-
```shell
63-
npm run electron
64-
```
41+
## Other useful commands
6542
66-
Run watch (this will build files on save)
43+
Run everything except for the Electron shell in watch mode:
6744
6845
```shell
69-
npm run watch
46+
npm run start:desktop
7047
```
7148
72-
Run dev server (this will handle the refresh of files and later should have live reload)
49+
Run **only** the Electron shell in watch mode*:
7350
7451
```shell
75-
npm run dev-server
52+
npm run launch:dev-electron
7653
```
7754
78-
Run dev electron (to use the dev server you need to run this)
55+
Start the experimental web UI in watch mode:
7956
8057
```shell
81-
npm run dev-electron
58+
npm run start:web
8259
```
83-
84-
## Working on the Shared Libraries and the Portal Extension
85-
86-
The Portal Extension relies on packages provided by the shared libraries. The portal installs the necessary dependencies that are published on a remote registry. If you want to work on the portal in tandem with local, unpublished versions of the shared libraries, you will need to run the following commands:
87-
88-
1. Install the Batch Utility CLI:
89-
90-
```shell
91-
npm run dev-setup
92-
```
93-
94-
2. Configure paths to relevant repos:
95-
96-
```shell
97-
bux configure
98-
```
99-
100-
3. Run the link command:
101-
102-
```shell
103-
bux link
104-
```
105-
106-
The Portal Extension will now use the shared libraries directly from this repo.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"gather-build-results": "bux gather-build-results",
6161
"launch": "npm run -s launch:web",
6262
"launch:desktop": "lerna run --parallel workspace:launch:desktop --stream",
63+
"launch:dev-electron": "cd desktop && npm run dev-electron",
6364
"launch:web": "lerna run --parallel workspace:launch:web --stream",
6465
"lint": "prettier -c . && lerna run --parallel workspace:lint --stream && npm run -s lint:markdown",
6566
"lint:fix": "prettier -w . && lerna run --parallel workspace:lint:fix --stream && npm run -s lint:markdown",

0 commit comments

Comments
 (0)