From 8bb3a3b8d7d588d2d95b95f63ab87df69875ed3d Mon Sep 17 00:00:00 2001 From: arne Date: Sun, 9 Nov 2025 08:35:00 +0100 Subject: [PATCH] add docs and improve development setup --- .dir-locals.el | 2 ++ README.md | 40 ++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++++ 3 files changed, 46 insertions(+) create mode 100644 .dir-locals.el create mode 100644 README.md diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 0000000..f4aef1f --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,2 @@ +((nil . ((cider-default-cljs-repl . shadow) + (cider-shadow-default-options . "frontend")))) diff --git a/README.md b/README.md new file mode 100644 index 0000000..8eb6a96 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# Lodestone + +Lodestone is an application to help you navigate the fediverse. It surfaces things you enjoyed by providing a private search interface that runs fully in your own browser. + +## Building a release + +Before anything, make sure JS dependencies are installed: + +``` bash +npm install +``` + +After that + +``` bash +npm run build +``` + +## Development + +Just as when building a release, you need to ensure that JS dependencies are installed: + +``` bash +npm install +``` + +After that you can start a process that watches and continuously builds and reloads your app when the source code is changed: + +``` bash +npm run dev +``` + +I'd recommend setting up a better development environment and [integrating shadow-cljs deeply into your editor](https://shadow-cljs.github.io/docs/UsersGuide.html#_editor_integration). You can get a continuous build that hot-reloads your app like above, and a REPL that allows you to send and evaluate individual expressions from your editor. This allows you to inspect and modify state and trigger events as you are live-developing your application. + +If you set up Emacs + [CIDER](https://docs.cider.mx/cider/config/basic_config.html) this can be done by running: + +``` txt +M-x cider-jack-in-cljs +``` + diff --git a/package.json b/package.json index 463078f..9b72872 100644 --- a/package.json +++ b/package.json @@ -8,5 +8,9 @@ "dependencies": { "react": "npm:@preact/compat@^18.3.1", "react-dom": "npm:@preact/compat@^18.3.1" + }, + "scripts": { + "build": "shadow-cljs release frontend", + "dev": "shadow-cljs watch frontend" } }