vugu / vugu

Vugu: A modern UI library for Go+WebAssembly (experimental)
https://www.vugu.org
MIT License
4.8k stars 175 forks source link

Use a Taskfile to build and test vugu #263

Closed owenwaller closed 2 months ago

owenwaller commented 6 months ago

Use a Taskfile (see: https://taskfile.dev/) to build the vugu packages, the vugugen and vugufmt command line tools, run all of the tests, and lint the source code.

This simplifies building vugu locally. All that is required now is

$ task all

at the top level of the repo. The Taskfile.yaml is fully documented.

Note: this is an initial version that only supports Linux as it relies on command line utilities that are installed by default on Linux. In addition it assumes that docker, tinygo and the golangci-lint tools are all installed locally. If they are not found then the task will abort. Supporting Windows will require changing the tasks to support the Windows PowerShell equivalents when the task in run on Windows.

owenwaller commented 5 months ago

I've added a new generate task which calls go generate github.com/vugu/vugu/vgform - which was part of the build task. And added the generate to the all task, but not made it a prerequisite of the build task.

At some future point the github workflow will check if the newly generated files differ from the ones in the repository. If they do then the build will fail, as this implies that the the newly updated generated files have not been committed by the developer.