Browse Source

Improve develop docs based on onboarding with Jakob

Gabriel Horner 3 years ago
parent
commit
e353738c67
2 changed files with 23 additions and 18 deletions
  1. 2 2
      docs/dev-practices.md
  2. 21 16
      docs/develop-logseq.md

+ 2 - 2
docs/dev-practices.md

@@ -88,6 +88,6 @@ shadow-cljs watch test --config-merge '{:autorun true :ns-regexp
 Tests can be automatically compiled and then selectively run on the commandline
 using https://github.com/lucywang000/shadow-test-utils. For this workflow:
 
-1. Run `clj -M:test watch test` in one terminal
+1. Run `clj -M:test watch test` in one shell
 2. Focus a test by adding a `^:focus` metadata flag
-3. In another terminal, run `node node static/tests.js`
+3. In another shell, run `node node static/tests.js`

+ 21 - 16
docs/develop-logseq.md

@@ -1,23 +1,28 @@
 # Develop Logseq
-### 1. Requirements
+## Requirements
 
 - [Node.js](https://nodejs.org/en/download/) (See [build.yml](.github/workflows/build.yml) for allowed version)  & [Yarn](https://classic.yarnpkg.com/en/docs/install/)
 - [Java & Clojure](https://clojure.org/guides/getting_started). (If you run into `Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2). -M:cljs (No such file or directory)`, it means you have a wrong Clojure version installed. Please uninstall it and follow the instructions linked.)
 
-### 2. Compile to JavaScript
+## Clone project
 
 ```bash
 git clone https://github.com/logseq/logseq
 cd logseq
+```
+
+## Browser development
+
+### Development
+
+```bash
 yarn
 yarn watch
 ```
 
-### 3. Open the browser
-
-Open <http://localhost:3001>.
+Then open the browser <http://localhost:3001>.
 
-### 4. Build a release
+### Production
 
 ```bash
 yarn release
@@ -25,25 +30,25 @@ yarn release
 
 ## Desktop app development
 
-### 1. Compile to JavaScript
+### Development
 
-```bash
-yarn watch
-```
-
-### 2. Install npm packages for building the desktop app
+1. Install npm packages for building the desktop app
 
 ``` bash
-cd static && yarn install && cd ..
+yarn install && cd static && yarn install && cd ..
 ```
-
-### 3. Open the dev app
+2. Compile to JavaScript and open the dev app
 
 ```bash
+yarn watch
+# Wait until watch is finished building and then in a different shell
 yarn dev-electron-app
 ```
 
-### 4. Build a release
+Alternatively, run `bb dev:electron-start` to do this step with one command.
+
+### Production
+Build a release:
 
 ```bash
 yarn release-electron