infogulch / xtemplate

A html/template-based hypertext preprocessor and rapid application development web server written in Go.
Apache License 2.0
74 stars 1 forks source link

Add a decent Task file / Make file and example #18

Closed gedw99 closed 6 months ago

gedw99 commented 6 months ago

Its a way for devs to try before they buy :)

I had to make one to get going with this project, so why not include one in the project with a simple example ?

gedw99 commented 6 months ago

https://github.com/infogulch/xrss seems to be a decent example ?

https://github.com/infogulch/todos also via caddy ?

gedw99 commented 6 months ago

There is a way to compile caddy with a caddy module without using xcaddy. I would like to add this to the Makefile also.

Its makes it very easy to work.

gedw99 commented 6 months ago

We have the caddy cmd now.

so closing here .

Don’t know about you but combining Xtemplate repo and caddy-Xtemplate into a single repo with a go.work will imho make it easier to work on and manage dependencies. I use this approach quite a lot.

the make file can then do both builds etc too.

Anyways let me know how you feel about that idea. I can also add a github action that does the build off the make file for Windows, Mac and Linux. Done it many times - works great

infogulch commented 6 months ago

I made it a separate repo before I realized that go.mod dependencies of a root module don't necessarily leak into dependents if only a submodule uses it. I may reconsider this.

Do you think a makefile is necessary? AFAIK there are only a handful of commands required besides the build script in the github workflow dir.

gedw99 commented 6 months ago

I use go.work file. It’s been awesome to do mono repos.

makefile is good so devs can quickly see how to do things. It task file. Not having one seems silly when every developer needs to run the same things. Also it’s possible to run the makefile in ci in GitHub actions. So one source of truth .

gedw99 commented 6 months ago

You’re right it’s not need at all .

closing