Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancorrales committed Mar 3, 2022
1 parent 17fe926 commit 002f365
Show file tree
Hide file tree
Showing 30 changed files with 567 additions and 593 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
# - id: trailing-whitespace
# - id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
# - id: check-added-large-files

- repo: https://github.com/golangci/golangci-lint
rev: v1.41.1
hooks:
- id: golangci-lint
#- repo: https://github.com/golangci/golangci-lint
# rev: v1.41.1
# hooks:
# - id: golangci-lint
10 changes: 9 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "./cmd/templatizer/",
"args": ["--verbose", "--source", "github.com/ivancorrales/go-template"]
},
{
"name": "templatizer-ui",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "./cmd/ui/"
}
]
}
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
[![CodeQL](https://github.com/wesovilabs/templatizer/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/wesovilabs/templatizer/actions/workflows/codeql-analysis.yml)
---

The intention of **Templatizer** is to provide a handy and powerful mechanism to create custom projects from templates.

**Templater** is created to empower the mechanism to take advantage of template repositories. It's known that Github (nor Gitlab) doesn't provide us a handy way to take advantage of the Template repositories. When we start from a Template we usually need to do a lot of manual and inefficient replacement tasks.
Tools such as Github or Gitlab claim that they support repositories as templates. Actually, they permit us to define repositories as templates but we need to make a copy and then we need to do as many replacements as we need. Sincerely this is not a template system from my point of view.
## Installation

**Download the artifact**
Expand Down
22 changes: 22 additions & 0 deletions cmd/client/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package main

import (
"embed"
"io/fs"
"net/http"
)

//go:embed templatizer-ui/build
var content embed.FS

func clientHandler() http.Handler {
fsys := fs.FS(content)
contentStatic, _ := fs.Sub(fsys, "templatizer-ui/build")
return http.FileServer(http.FS(contentStatic))
}

func main() {
mux := http.NewServeMux()
mux.Handle("/", clientHandler())
http.ListenAndServe(":3000", mux)
}
1 change: 1 addition & 0 deletions cmd/client/templatizer-ui
Submodule templatizer-ui added at 3c94d5
13 changes: 13 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import "github.com/wesovilabs/templatizer/pkg/api"

const (
localAddress = ":5001"
basePath = "/api"
)

func main() {
router := api.SetUpRouter(basePath)
router.Run(localAddress)
}
59 changes: 0 additions & 59 deletions cmd/templatizer/help/help.go

This file was deleted.

25 changes: 0 additions & 25 deletions cmd/templatizer/main.go

This file was deleted.

82 changes: 0 additions & 82 deletions cmd/templatizer/run/run.go

This file was deleted.

1 change: 1 addition & 0 deletions cmd/ui/client
Submodule client added at 3c94d5
8 changes: 0 additions & 8 deletions examples/params.yml

This file was deleted.

13 changes: 13 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/wesovilabs/templatizer
go 1.17

require (
github.com/gin-gonic/gin v1.7.7
github.com/go-git/go-billy/v5 v5.3.1
github.com/go-git/go-git/v5 v5.4.2
github.com/sirupsen/logrus v1.8.1
Expand All @@ -18,22 +19,34 @@ require (
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/matryer/is v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220111092808-5a964db01320 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading

0 comments on commit 002f365

Please sign in to comment.