Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed Dec 12, 2023
1 parent f89eb7c commit eefc287
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/happyx_native/app/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ template nativeApp*(appDirectory: string = "/assets", port: int = 5000,
appMode: bool = true, title: string = "",
resizeable: bool = true, establish: bool = true
) {.dirty.} =
## Compiles main happyx file, opens browser in `appMode` and
## starts serving at localhost with `port
##
## Your project should have this structure:
##
## ```
## assets/
## ├─ index.html
## ├─ main.nim
## app.nim
## ```
# Compile main
discard execCmdEx(
"nim js -d:danger --opt:size " & getCurrentDir() / appDirectory & "/main.nim"
Expand Down

0 comments on commit eefc287

Please sign in to comment.