From 75d5c0423ce4626296a0a77f5416f297a7cb26e2 Mon Sep 17 00:00:00 2001 From: Reaper Gelera Date: Sat, 1 Jul 2023 16:04:12 +0530 Subject: [PATCH] docs: add dev server basic information --- docs/pages/04-dev-server.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/pages/04-dev-server.md diff --git a/docs/pages/04-dev-server.md b/docs/pages/04-dev-server.md new file mode 100644 index 0000000..171554a --- /dev/null +++ b/docs/pages/04-dev-server.md @@ -0,0 +1,35 @@ +# Development Server + +The tool comes with it's own dev server (since v0.2.4), and can be used to run a +simple file server for the output folder. + +It's as simple as running the following command + +```sh +$ alvu --serve +# short for +$ alvu --serve --port=3000 +``` + +## Live Reload + +Added in `v0.2.9` + +There's no changes that you need to do, just upgrade your installation to +`v0.2.9` + +#### What's to be expected + +- Will reload on changes from the directories `pages`, `public` , or if you + changed them with flags then the respective paths will be watched instead + +- The rebuilding process is atomic and will recompile a singular file if that's + all that's changed instead of compiling the whole folder. This is only true + for files in the `pages` directory, if any changes were made in `public` + directory then the whole alvu setup will rebuild itself again. + +#### Caveats + +- `./hooks` are not watched, this is because hooks have their own state and + involve a VM, the current structure of alvu stops us from doing this but + should be done soon without increasing complexity or size of alvu itself.