From 1ff134685b4a729c9c2cc0bff00713a0d6812667 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 2 Sep 2021 12:25:05 +0200 Subject: remove Tup from documentation and nix --- README.md | 41 +++++++++++++++++++++++++---------------- shell.nix | 2 +- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5ed80e5..b732b44 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,36 @@ This repo is roughly split into three parts: authored using a mix of Moonscript, Markdown and HTML, thanks to the power of `mmmfs`. \[[data: `root`](root), but you might want to read a bit about mmmfs before you jump in.] -Building & Viewing ------------------- -mmm is built using [tup][tup]. -You can build the static content with: - - $ tup init - $ tup - -Then you can run the interactive server (`build/server.moon`): +Running or Building +------------------- +You can run the interactive server (`build/server.moon`): $ moon build/server.moon fs You can then view the website in your browser. It should be availabe at `http://localhost:8000`. +Alternatively, `build/render_all.moon` can be used to generate a static HTML version of a tree: + + $ moon build/render_all.moon fs output-dir /root/path + +The `/root/path/` argument is optional and needs to be set if the generated HTML will not be +served from the root `/` of a server (which is assumed per default). + +### Storage +The `fs` argument in the commands above specifies where and how the content is to be found. +The argument consists first of the type of storage, +and then optionally extra arguments separated by a colon (`:`). +The following types are available: + +- `fs:[path]`: load a directory from the filesystem. + + `path` is the path of the root directory, relative to the current directory. + If omitted, defaults to `root`. +- `sql:[path]`: load a SQLite3 database. + + `path` is the path to the sqlite database file. + If omitted, defaults to `db.sqlite3`. +- `sql:MEMORY`: create an emptry in-memory SQLite3 database. + ### Dependencies Required dependencies: @@ -50,16 +65,10 @@ Not required but recommended: - [luaposix](https://luarocks.org/modules/gvvaughan/luaposix): `luarocks install luaposix` (for SASS support) ### Live Reloading (during development) -During development you may want to automatically rebuild the project as files are changed. -You can let tup automatically rebuild the client runtime and stylesheet with the following command: - - $ tup monitor -f -a - -[entr][entr] is useful for reloading the realtime server when code outside the root changes: +[entr][entr] is useful for reloading the realtime server when code outside the `root` changes: $ ls {build,mmm}/**.moon | entr -r moon build/server.moon fs [moonscript]: https://moonscript.org/ [mmm]: https://mmm.s-ol.nu/ -[tup]: https://gittup.org/tup [entr]: http://eradman.com/entrproject/ diff --git a/shell.nix b/shell.nix index 703f8b5..490ae04 100644 --- a/shell.nix +++ b/shell.nix @@ -47,7 +47,7 @@ let in pkgs.mkShell { name = "mmm-env"; buildInputs = with pkgs; [ - tup sassc entr + sassc entr (lua5_3.withPackages (p: with p; [ moonscript http cjson discount busted luaposix ])) ]; shellHook = '' -- cgit v1.2.3