Bläddra i källkod

doc: suggestions on win dev inst. from gabriel

Co-authored-by: Gabriel Horner <[email protected]>
Junyi Du 3 år sedan
förälder
incheckning
fa1a261004
4 ändrade filer med 73 tillägg och 68 borttagningar
  1. 3 64
      README.md
  2. 4 4
      docs/develop-logseq-on-windows.md
  3. 66 0
      docs/develop-logseq.md
  4. 0 0
      docs/docker-web-app-guide.md

+ 3 - 64
README.md

@@ -79,72 +79,11 @@ The following is for developers and designers who want to build and run Logseq l
 We have [a dedicated overview page](https://github.com/logseq/logseq/blob/master/CODEBASE_OVERVIEW.md) for Logseq's codebase overview and [a development practices page](docs/dev-practices.md).
 
 ## Set up development environment
-* The following instructions are for setting up web app / desktop app development environment on macOS / Linux. For other cases like Windows users or mobile development, please refer to [Docs directory](docs/)
-### 1. Requirements
+* For setting up web app / desktop app development environment on macOS / Linux, please refer to [Develop Logseq](docs/develop);
 
-- [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.)
+* For Windows users, please refer to [Develop LogSeq on Windows](docs/develop-logseq-on-windows.md) in addition.
 
-### 2. Compile to JavaScript
-
-```bash
-git clone https://github.com/logseq/logseq
-cd logseq
-yarn
-yarn watch
-```
-
-### 3. Open the browser
-
-Open <http://localhost:3001>.
-
-### 4. Build a release
-
-```bash
-yarn release
-```
-
-### 5. Run tests
-
-Run ClojureScript tests
-
-```bash
-yarn test
-```
-
-Run E2E tests
-
-``` bash
-yarn electron-watch
-# in another shell
-yarn e2e-test # or npx playwright test
-```
-
-## Desktop app development
-
-### 1. Compile to JavaScript
-
-```bash
-yarn watch
-```
-
-### 2. Install npm packages for building the desktop app
-
-``` bash
-cd static && yarn install && cd ..
-```
-
-### 3. Open the dev app
-
-```bash
-yarn dev-electron-app
-```
-
-### 4. Build a release
-
-```bash
-yarn release-electron
-```
+There are more guides in [docs/](docs/), e.g. the [Guide for contributing to translations](docs/contributing-to-translations.md) and the [Docker web app guide](docs/docker-web-app-guide.md)
 
 ## Thanks
 

+ 4 - 4
docs/Develop LogSeq on Windows.md → docs/develop-logseq-on-windows.md

@@ -1,7 +1,7 @@
 # Build Logseq Desktop on Windows
 
 ## Intro
-This is a guidance on creating Logseq development environment on Windows with `PowerShell`. Non-platform specific instructions like [this section in README.md](https://github.com/logseq/logseq/blob/master/README.md#set-up-development-environment) **should also be referenced** in the practice.
+This is a guide on creating Logseq development environment on Windows with `PowerShell`. Non-platform specific instructions like [Develop Logseq](develop-logseq.md) **should also be referenced**.
 
 ## Pre-requisites
 * Ensure `Set-ExecutionPolicy Unrestricted` (or other equivalent)
@@ -27,7 +27,7 @@ Congrats! The pre-requisites are ready.
 ## Set-up development environment (web app)
 The basic idea is replacing the `clojure` commands in [package.json](https://github.com/logseq/logseq/blob/master/package.json) to `clj`.  
 Go to your cloned Logseq repo. Then:
-* `yarn` (to install dependencies. Refer [THIS](#an-example-of-setting-up-proxy-in-powershell) if you want to setup proxy)
+* `yarn` (to install dependencies. Refer [THIS](#an-example-of-setting-up-proxy-in-powershell) if you want to setup proxy in `PowerShell`)
 * `clj -M:cljs watch app electron` (the `clj` equivalent of `yarn cljs:watch`)
 
 Now you can access the app via `http://localhost:3001` and all changes to the code will be watched.
@@ -39,13 +39,13 @@ Now you can access the app via `http://localhost:3001` and all changes to the co
 * `yarn`
 * `cd ..`
 
-Then do the `gulp`'s job manually (as it's not available on Windows). Folloing commands are equivalent to `yarn dev-electron-app`:
+Then do the `gulp`'s job manually (as it's not available on Windows). Following commands are equivalent to `yarn dev-electron-app`:
 * copy files in `resources` to `static`
 * `yarn css:build`
 * `cd static`
 * `yarn electron:dev`
 
-The desktop app should be pop-up on your screen.
+The desktop app should pop-up on your screen.
 
 ## An example of setting up proxy in PowerShell
 ```

+ 66 - 0
docs/develop-logseq.md

@@ -0,0 +1,66 @@
+# Develop Logseq
+### 1. 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
+
+```bash
+git clone https://github.com/logseq/logseq
+cd logseq
+yarn
+yarn watch
+```
+
+### 3. Open the browser
+
+Open <http://localhost:3001>.
+
+### 4. Build a release
+
+```bash
+yarn release
+```
+
+### 5. Run tests
+
+Run ClojureScript tests
+
+```bash
+yarn test
+```
+
+Run E2E tests
+
+``` bash
+yarn electron-watch
+# in another shell
+yarn e2e-test # or npx playwright test
+```
+
+## Desktop app development
+
+### 1. Compile to JavaScript
+
+```bash
+yarn watch
+```
+
+### 2. Install npm packages for building the desktop app
+
+``` bash
+cd static && yarn install && cd ..
+```
+
+### 3. Open the dev app
+
+```bash
+yarn dev-electron-app
+```
+
+### 4. Build a release
+
+```bash
+yarn release-electron
+```

+ 0 - 0
docs/Docker Web App Guide.md → docs/docker-web-app-guide.md