-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from barelyhuman/feat/live-reload
feat: Live Server
- Loading branch information
Showing
6 changed files
with
384 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
<small>Added in `v0.2.9`</small> | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>alvu | documentation</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link rel="stylesheet" href="{{.Meta.BaseURL}}styles.css" /> | ||
</head> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>alvu | documentation</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap" | ||
rel="stylesheet" /> | ||
<link rel="stylesheet" href="{{.Meta.BaseURL}}styles.css"> | ||
</head> | ||
|
||
<body> | ||
{{.Content}} | ||
<footer class="container"> | ||
Built with <a href="http://github.com/barelyhuman/alvu">alvu</a> | ||
</footer> | ||
</body> | ||
|
||
<body> | ||
{{.Content}} | ||
<footer class="container"> | ||
Built with <a href="http://github.com/barelyhuman/alvu">alvu</a> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.