|
Previously to developer and test trunks on local we need to run "tsc -w"
on directory _www to watch and recompile any changes to TypeScript files,
and run "go run ./cmd/trunks-example" to view the Trunks web interface.
Since we will have internal documentation inside _www/docs, we need
to run another ciigo server that watch any changes to .adoc files
and convert it to HTML.
Three separate commands for development.
This changes refactoring the development process by running two
goroutines when TRUNKS_DEV environment variable is set to non-empty.
One goroutine watch any changes to TypeScript, HTML, and
tsconfig files inside the _www, and when there is an update it will
execute "tsc -p" to recompile and "go run ./internal/generate-memfs" to
embed them into Go source.
Another goroutine watch any changes to .adoc files inside "_www/docs"
directory and convert them into HTML files.
This goroutine will running in the background while the HTTP server is
running too.
|