From 54d6748fdc2eed762d2eab7159bb27139d68b20a Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 2 Apr 2024 19:29:36 +0000 Subject: [PATCH 1/5] Updating some of the workflow stuff and upgrading go versions --- .github/workflows/checks.yml | 6 +++--- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ go.mod | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2491abd..d1f0fb2 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,7 +1,7 @@ # This workflow will build a golang project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go -name: Go +name: CI Checks on: push: @@ -14,12 +14,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.22' - name: Build run: go build -v ./... diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..4a17251 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy + +on: + release: + types: + - "published" + +jobs: + build-and-publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Install Dependencies + run: go get . + + - name: Build + run: go build -v ./... -o tmplts diff --git a/go.mod b/go.mod index 9ac304d..38c5e98 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ehutchllew/template.ts -go 1.20 +go 1.22 require ( github.com/charmbracelet/bubbles v0.16.1 From d001920db399a95371bb7aa0708fe7f0a54c1238 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 2 Apr 2024 19:49:55 +0000 Subject: [PATCH 2/5] Updating eslint highway rules version --- cmd/models/questionnaire.model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/models/questionnaire.model.go b/cmd/models/questionnaire.model.go index 777cf3a..4dc6a80 100644 --- a/cmd/models/questionnaire.model.go +++ b/cmd/models/questionnaire.model.go @@ -183,7 +183,7 @@ func (u *UserAnswers) ListEsLintDevDependencies() []Dependency { }, { Key: "@ev-the-dev/highway", - Value: "^0.2.0", + Value: "^0.2.2", }, } From 1a2a36ec4bdd89a4145baa6be14716b1ad047905 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 2 Apr 2024 20:31:50 +0000 Subject: [PATCH 3/5] Changing binary output --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a17251..98ffc7b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,4 +24,4 @@ jobs: run: go get . - name: Build - run: go build -v ./... -o tmplts + run: go build -v ./... -o bin/confits From e598c84f266116deeea40648bbc23e6ee170623b Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 2 Apr 2024 20:41:09 +0000 Subject: [PATCH 4/5] Updating workflow and module ref after transfer --- cmd/root.cmd.go | 8 ++++---- cmd/utils/generateTemplates.util.go | 4 ++-- go.mod | 2 +- main.go | 2 +- tui/wizard.tui.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/root.cmd.go b/cmd/root.cmd.go index a6b28e0..b3be9cc 100644 --- a/cmd/root.cmd.go +++ b/cmd/root.cmd.go @@ -6,9 +6,9 @@ import ( "os" "path" - "github.com/ehutchllew/template.ts/cmd/models" - "github.com/ehutchllew/template.ts/cmd/utils" - "github.com/ehutchllew/template.ts/tui" + "github.com/ev-the-dev/confits/cmd/models" + "github.com/ev-the-dev/confits/cmd/utils" + "github.com/ev-the-dev/confits/tui" "github.com/spf13/cobra" ) @@ -67,7 +67,7 @@ func init() { func printWelcomeMessage() { fmt.Println("**********************************************") fmt.Println("* *") - fmt.Println("* Welcome to Template.TS! Let's get started. *") + fmt.Println("* Welcome to Confits! Let's get started. *") fmt.Println("* *") fmt.Println("**********************************************") } diff --git a/cmd/utils/generateTemplates.util.go b/cmd/utils/generateTemplates.util.go index 6f9ee06..ad3dde3 100644 --- a/cmd/utils/generateTemplates.util.go +++ b/cmd/utils/generateTemplates.util.go @@ -6,8 +6,8 @@ import ( "sync" "text/template" - "github.com/ehutchllew/template.ts/cmd/models" - ct "github.com/ehutchllew/template.ts/templates" + "github.com/ev-the-dev/confits/cmd/models" + ct "github.com/ev-the-dev/confits/templates" ) // TODO: If package.json already exists: unmarshal, add these changes, then marshal again. That way we don't overwrite entire files. diff --git a/go.mod b/go.mod index 38c5e98..fcc0ded 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ehutchllew/template.ts +module github.com/ev-the-dev/confits go 1.22 diff --git a/main.go b/main.go index 6b68f89..72c0858 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/ehutchllew/template.ts/cmd" + "github.com/ev-the-dev/confits/cmd" ) func main() { diff --git a/tui/wizard.tui.go b/tui/wizard.tui.go index 8ea39d1..e18be02 100644 --- a/tui/wizard.tui.go +++ b/tui/wizard.tui.go @@ -7,7 +7,7 @@ import ( "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - "github.com/ehutchllew/template.ts/cmd/models" + "github.com/ev-the-dev/confits/cmd/models" ) type WizardAnswers struct { From 41812cc47dc284c41471b305d2ec72487b6720e7 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 2 Apr 2024 20:46:21 +0000 Subject: [PATCH 5/5] Jk, like TmplTS more --- .github/workflows/deploy.yml | 2 +- README.md | 2 +- cmd/root.cmd.go | 8 ++++---- cmd/utils/generateTemplates.util.go | 4 ++-- go.mod | 2 +- main.go | 2 +- tui/wizard.tui.go | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 98ffc7b..9653832 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,4 +24,4 @@ jobs: run: go get . - name: Build - run: go build -v ./... -o bin/confits + run: go build -v ./... -o bin/tmplts diff --git a/README.md b/README.md index ea39eaa..8e2366a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# template.ts +# TmplTS Package to bootstrap TypeScript projects with ESLint, SWC or ESBuild, and Jest configurations. Additionally it will include appropriate scripts and dependencies in the `package.json` file for each generated configuration file. diff --git a/cmd/root.cmd.go b/cmd/root.cmd.go index b3be9cc..56a8334 100644 --- a/cmd/root.cmd.go +++ b/cmd/root.cmd.go @@ -6,9 +6,9 @@ import ( "os" "path" - "github.com/ev-the-dev/confits/cmd/models" - "github.com/ev-the-dev/confits/cmd/utils" - "github.com/ev-the-dev/confits/tui" + "github.com/ev-the-dev/tmplts/cmd/models" + "github.com/ev-the-dev/tmplts/cmd/utils" + "github.com/ev-the-dev/tmplts/tui" "github.com/spf13/cobra" ) @@ -67,7 +67,7 @@ func init() { func printWelcomeMessage() { fmt.Println("**********************************************") fmt.Println("* *") - fmt.Println("* Welcome to Confits! Let's get started. *") + fmt.Println("* Welcome to TmplTS! Let's get started. *") fmt.Println("* *") fmt.Println("**********************************************") } diff --git a/cmd/utils/generateTemplates.util.go b/cmd/utils/generateTemplates.util.go index ad3dde3..63173cc 100644 --- a/cmd/utils/generateTemplates.util.go +++ b/cmd/utils/generateTemplates.util.go @@ -6,8 +6,8 @@ import ( "sync" "text/template" - "github.com/ev-the-dev/confits/cmd/models" - ct "github.com/ev-the-dev/confits/templates" + "github.com/ev-the-dev/tmplts/cmd/models" + ct "github.com/ev-the-dev/tmplts/templates" ) // TODO: If package.json already exists: unmarshal, add these changes, then marshal again. That way we don't overwrite entire files. diff --git a/go.mod b/go.mod index fcc0ded..013d7d6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ev-the-dev/confits +module github.com/ev-the-dev/tmplts go 1.22 diff --git a/main.go b/main.go index 72c0858..eae9901 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/ev-the-dev/confits/cmd" + "github.com/ev-the-dev/tmplts/cmd" ) func main() { diff --git a/tui/wizard.tui.go b/tui/wizard.tui.go index e18be02..efcf3c6 100644 --- a/tui/wizard.tui.go +++ b/tui/wizard.tui.go @@ -7,7 +7,7 @@ import ( "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - "github.com/ev-the-dev/confits/cmd/models" + "github.com/ev-the-dev/tmplts/cmd/models" ) type WizardAnswers struct {