From 197fd8d316006d6865988b7faaae347b41d8874e Mon Sep 17 00:00:00 2001 From: GSI2023 <2023@groovy-skills.com> Date: Tue, 31 Jan 2023 09:31:32 -0300 Subject: [PATCH] describe setup without depending on root privileges also fall back to sane default when `$GOPATH` unset, update to use `go install`, name missing nodejs module, correct variable brackets to curly ones --- developer/setup.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/developer/setup.md b/developer/setup.md index 1e4d6b1..f4cb161 100644 --- a/developer/setup.md +++ b/developer/setup.md @@ -33,8 +33,9 @@ cd writefreely Next, install the bindata generator and create `bindata.go` (needed for a successful build). ```bash -go get -u github.com/jteeuwen/go-bindata/go-bindata -go-bindata -pkg writefreely -ignore=\\.gitignore schema.sql sqlite.sql +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.) @@ -50,17 +51,18 @@ You can now run WriteFreely! But you'll need one more step to generate some asse You'll need Node.js and LESS installed to generate WriteFreely static assets. Install LESS: ```bash -npm install -g less +npm install less less-plugin-clean-css ``` Next, compile all stylesheets from the `less` directory, creating them in the `static/css/` directory: ```bash cd less -export CSSDIR=../static/css/ -lessc app.less --clean-css="--s1 --advanced" $(CSSDIR)write.css -lessc fonts.less --clean-css="--s1 --advanced" $(CSSDIR)fonts.css -lessc icons.less --clean-css="--s1 --advanced" $(CSSDIR)icons.css +LESSC=../node_modules/less/bin/lessc +CSSDIR=../static/css +$LESSC app.less --clean-css="--s1 --advanced" ${CSSDIR}/write.css +$LESSC fonts.less --clean-css="--s1 --advanced" ${CSSDIR}/fonts.css +$LESSC icons.less --clean-css="--s1 --advanced" ${CSSDIR}/icons.css ``` Now you can run and distribute WriteFreely! 🎉