mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
doc: suggestions on win dev inst. from gabriel
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
This commit is contained in:
@@ -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
docs/develop-logseq.md
Normal file
66
docs/develop-logseq.md
Normal file
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user