Merge pull request #52 from writefreely/update-dev-docs

Update developer setup docs
This commit is contained in:
Matt Baer 2024-02-03 11:28:01 +01:00 committed by GitHub
commit 5906c72660
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,8 +4,8 @@ Ready to hack on your site? Here's a quick overview.
## Prerequisites ## Prerequisites
* [Go 1.13+](https://golang.org/dl/) * [Go 1.19+](https://golang.org/dl/)
* [Node.js](https://nodejs.org/en/download/) * [Node.js 15+](https://nodejs.org/en/download/)
## Quick start ## Quick start
@ -30,14 +30,6 @@ git clone https://github.com/writefreely/writefreely.git
cd writefreely cd writefreely
``` ```
Next, install the bindata generator and create `bindata.go` (needed for a successful build).
```bash
GOPATH=${GOPATH:-$HOME/go/bin}
go install github.com/jteeuwen/go-bindata/go-bindata
${GOPATH}/go-bindata -pkg writefreely -ignore=\\.gitignore schema.sql sqlite.sql
```
Finally, build the `writefreely` binary with SQLite support. (Remove `-tags='sqlite'` if you don't need SQLite support.) Finally, build the `writefreely` binary with SQLite support. (Remove `-tags='sqlite'` if you don't need SQLite support.)
```bash ```bash
@ -48,21 +40,29 @@ You can now run WriteFreely! But you'll need one more step to generate some asse
### Building site assets ### Building site assets
You'll need Node.js and LESS installed to generate WriteFreely static assets. Install LESS: You'll need Node.js and LESS installed to generate WriteFreely static assets. Install LESS using our utility script:
```bash ```bash
npm install less less-plugin-clean-css ./less/install-less.sh
``` ```
Next, compile all stylesheets from the `less` directory, creating them in the `static/css/` directory: Next, compile all stylesheets from the `less` directory, creating them in the `static/css/` directory:
```bash ```bash
cd less cd less
LESSC=../node_modules/less/bin/lessc
CSSDIR=../static/css CSSDIR=../static/css
$LESSC app.less --clean-css="--s1 --advanced" ${CSSDIR}/write.css lessc app.less --clean-css="--s1 --advanced" ${CSSDIR}/write.css
$LESSC fonts.less --clean-css="--s1 --advanced" ${CSSDIR}/fonts.css lessc fonts.less --clean-css="--s1 --advanced" ${CSSDIR}/fonts.css
$LESSC icons.less --clean-css="--s1 --advanced" ${CSSDIR}/icons.css lessc icons.less --clean-css="--s1 --advanced" ${CSSDIR}/icons.css
lessc prose.less --clean-css="--s1 --advanced" ${CSSDIR}/prose.css
```
Finally, build ProseMirror:
```bash
cd ../prose
npm install
npm run-script build
``` ```
Now you can run and distribute WriteFreely! 🎉 Now you can run and distribute WriteFreely! 🎉