-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up examples and fix instructions
- Loading branch information
Showing
4 changed files
with
24 additions
and
22 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
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,25 +1,27 @@ | ||
# minimal | ||
|
||
[![Package Version](https://img.shields.io/hexpm/v/minimal)](https://hex.pm/packages/minimal) | ||
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/minimal/) | ||
Bare minimum example rendering a hello message to the screen. | ||
|
||
```sh | ||
gleam add minimal | ||
## Bundling the app | ||
|
||
This example uses [esgleam](https://hexdocs.pm/esgleam/) to bundle the main gleam module for use in a static site. | ||
|
||
To install esbuild run the following command. You should only need to run it once. | ||
|
||
```bash | ||
gleam run -m esgleam/install | ||
``` | ||
```gleam | ||
import minimal | ||
|
||
pub fn main() { | ||
// TODO: An example of the project in use | ||
} | ||
To bundle the app run the following command after making code changes. | ||
|
||
```bash | ||
gleam run -m esgleam/bundle | ||
``` | ||
|
||
Further documentation can be found at <https://hexdocs.pm/minimal>. | ||
## Serving the app | ||
|
||
## Development | ||
You can use any static site server to host the app but for development you can continue to use esgleam by running | ||
|
||
```sh | ||
gleam run # Run the project | ||
gleam test # Run the tests | ||
gleam shell # Run an Erlang shell | ||
```bash | ||
gleam run -m esgleam/serve | ||
``` |
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