2022-02-19 04:14:20 +00:00
# Develop Logseq
2022-02-22 22:18:23 +00:00
## Requirements
2022-02-19 04:14:20 +00:00
2022-03-17 17:33:31 +00:00
- [Node.js ](https://nodejs.org/en/download/ ) (See [build.yml ](https://github.com/logseq/logseq/blob/master/.github/workflows/build.yml ) for allowed version) & [Yarn ](https://classic.yarnpkg.com/en/docs/install/ )
2022-02-19 04:14:20 +00:00
- [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.)
2022-02-22 22:18:23 +00:00
## Clone project
2022-02-19 04:14:20 +00:00
2022-02-23 14:49:41 +00:00
This is a required step before doing any development or production builds.
2022-02-19 04:14:20 +00:00
```bash
git clone https://github.com/logseq/logseq
cd logseq
2022-02-22 22:18:23 +00:00
```
## Browser development
### Development
```bash
2022-02-19 04:14:20 +00:00
yarn
yarn watch
```
2022-02-22 22:18:23 +00:00
Then open the browser < http: / / localhost:3001 > .
2022-02-19 04:14:20 +00:00
2022-02-22 22:18:23 +00:00
### Production
2022-02-19 04:14:20 +00:00
```bash
yarn release
```
## Desktop app development
2022-02-22 22:18:23 +00:00
### Development
2022-02-19 04:14:20 +00:00
2022-02-22 22:18:23 +00:00
1. Install npm packages for building the desktop app
2022-02-19 04:14:20 +00:00
``` bash
2022-02-22 22:18:23 +00:00
yarn install & & cd static & & yarn install & & cd ..
2022-02-19 04:14:20 +00:00
```
2022-02-22 22:18:23 +00:00
2. Compile to JavaScript and open the dev app
2022-02-19 04:14:20 +00:00
```bash
2022-02-22 22:18:23 +00:00
yarn watch
# Wait until watch is finished building and then in a different shell
2022-02-19 04:14:20 +00:00
yarn dev-electron-app
```
2022-02-23 14:49:41 +00:00
Alternatively, run `bb dev:electron-start` to do this step with one command. To
download bb, see https://github.com/babashka/babashka#installation.
2022-02-22 22:18:23 +00:00
### Production
Build a release:
2022-02-19 04:14:20 +00:00
```bash
yarn release-electron
2022-02-22 21:47:04 +00:00
```