Configuration
The hop compiler is configured via a hop.toml file that marks the root of a hop project.
Below is a reference configuration, containing all the parameters that can be configured.
toml
# Configuration parameters used when compiling to TypeScript.
[target.typescript]
# The path to the file generated by the hop compiler
# when compiling to TypeScript.
output = "frontend.ts"
# The commands needed to compile and start a TypeScript
# server.
compile_and_run = ["node server.ts"]
# Configuration parameters used when compiling to Go.
[target.go]
# The path to the file generated by the hop compiler
# when compiling to Go.
output = "frontend/frontend.go"
# The package name to use for the generated Go file.
package = "frontend"
# The commands needed to compile and start a Go server.
compile_and_run = ["go build", "./server"]
# Configuration parameters used when compiling to Python.
[target.python]
# The path to the file generated by the hop compiler
# when compiling to Python.
output = "frontend.py"
# The commands needed to compile and start a Python server.
compile_and_run = ["python3 server.py"]