8 Commits
Author SHA1 Message Date
FernandoJVideira e36c0b3355 Merge pull request 'Bump template submodule to vue-ui-kit 0.5.0' (#13) from chore/template-vue-ui-kit-0.5.0 into main
Reviewed-on: #13
2026-10-11 20:44:31 +00:00
FernandoJVideiraandClaude Sonnet 5.5 5463e527eb chore: bump template submodule to vue-ui-kit 0.5.0
Picks up project-template #7: generated projects use @fernandojvideira/vue-ui-kit
^0.5.0 and drop the stale minimumReleaseAge exclusions.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-11 21:43:30 +01:00
FernandoJVideira 7285594f3c Merge pull request 'Derive the build version from the git tag' (#12) from fix/version-from-git-tag into main
Reviewed-on: #12
2026-10-08 23:11:42 +00:00
FernandoJVideiraandClaude Sonnet 5.5 ab322b7d91 Derive the build version from the git tag
The version was a hand-edited constant in the Makefile, so tagging a release
without first committing the bump produced a release whose binaries disagree
with it: v0.2.1 was tagged on a commit still saying VERSION := v0.2.0, and
all four binaries attached to that release print v0.2.0 from `draft version`.

VERSION now comes from `git describe --tags --always`: exactly the tag on a
tagged commit (v0.2.1), tag-plus-distance after it (v0.2.1-3-g1a2b3c4), `dev`
outside a git checkout such as a source tarball. `make build VERSION=...`
still overrides it. There is nothing left to bump before tagging.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-09 00:08:56 +01:00
FernandoJVideira 8a11de5b0f Merge pull request 'Scaffold generated clients with @lucide/vue' (#11) from chore/lucide-vue into main
Reviewed-on: #11
2026-10-08 22:55:31 +00:00
FernandoJVideiraandClaude Sonnet 5.5 b7fe8f3f4e Scaffold generated clients with @lucide/vue
The template overlay now imports its icons from @lucide/vue (project-template#6),
so the scaffolder has to install that instead of the deprecated
lucide-vue-next: pnpm doesn't hoist the kit's own copy to the app, and a
fresh project would fail to resolve its icon imports. No version is pinned
here - these stay unpinned `pnpm add` calls, so the template remains the
version authority.

Submodule bumped to that commit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-08 23:54:00 +01:00
FernandoJVideira 0bd1550779 Merge pull request 'Generated clients: exclude vue-ui-kit from Vite pre-bundling, /signup route' (#10) from fix/generated-client-configs into main
Reviewed-on: #10
2026-09-16 12:58:56 +00:00
FernandoJVideiraandClaude Fable 5.1 1dcc135094 Generated clients: exclude vue-ui-kit from Vite pre-bundling, /signup route
Generated projects never got the optimizeDeps exclusion the template's
own configs carry - the Nuxt config is patched from nuxi's output and the
Vue one from create-vue's - so Vite bundled vue-ui-kit's index.ts with
reka-ui inlined while the kit's .vue files imported reka-ui from source.
Two module instances, mismatched provide/inject Symbols: a fresh Vue
client rendered a blank /login ("Injection Symbol(TabsRootContext) not
found") and a fresh Nuxt one crashed SSR on any page with a Dialog. Both
config patches now add the exclusion.

The Nuxt patch also adds the pages:extend hook that gives pages/login.vue
a second /signup record, matching the template's auth card whose tabs now
drive the URL (project-template#5). Submodule bumped to that commit.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-16 13:58:23 +01:00
3 changed files with 46 additions and 5 deletions

No files matched your search

+5 -1
View File
@@ -1,5 +1,9 @@
PKG_NAME := git.fernandovideira.com/FernandoJVideira/draft PKG_NAME := git.fernandovideira.com/FernandoJVideira/draft
VERSION := v0.2.0 # Taken from the git tag, so a build can never disagree with the release it was
# cut from: exactly `v0.2.1` on that tag, `v0.2.1-3-g1a2b3c4` three commits
# later, `dev` outside a git checkout (e.g. a source tarball). Override with
# `make build VERSION=v1.2.3`.
VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo dev)
GO_SOURCES := $(shell find . -name '*.go' -not -path './assets/testdata/*') GO_SOURCES := $(shell find . -name '*.go' -not -path './assets/testdata/*')
.PHONY: version build windows win-arm linux mac prepare-embed clean .PHONY: version build windows win-arm linux mac prepare-embed clean
+40 -3
View File
@@ -88,7 +88,7 @@ func scaffoldClientNuxt(projectDir, serviceName string) error {
fmt.Println("📦 Installing dependencies...") fmt.Println("📦 Installing dependencies...")
if err := runCommand(projectDir, "pnpm", "add", "pinia", "@pinia/nuxt", if err := runCommand(projectDir, "pnpm", "add", "pinia", "@pinia/nuxt",
"@fernandojvideira/vue-ui-kit", "lucide-vue-next", "@fernandojvideira/vue-ui-kit", "@lucide/vue",
); err != nil { ); err != nil {
return fmt.Errorf("error installing dependencies: %w", err) return fmt.Errorf("error installing dependencies: %w", err)
} }
@@ -128,6 +128,25 @@ func patchNuxtConfig(projectDir, serviceName string) error {
css: ['~/assets/css/main.css'], css: ['~/assets/css/main.css'],
vite: { vite: {
plugins: [tailwindcss()], plugins: [tailwindcss()],
// vue-ui-kit ships raw .vue/.ts source. Left to Vite's dependency
// pre-bundler, its index.ts gets bundled with reka-ui inlined while its
// .vue files import reka-ui from source - two module instances, so
// reka-ui's provide/inject contexts (Dialog, Tabs, Select...) can't find
// each other. Excluding it keeps every import on the one reka-ui.
optimizeDeps: {
exclude: ['@fernandojvideira/vue-ui-kit'],
},
},
hooks: {
// /login and /signup are the two tabs of one auth card, served by the
// same page file. A second route record (not an alias - the router
// would treat switching between a route and its alias as a duplicate
// navigation and drop it) lets the tab change the URL while NuxtPage
// keeps the same component instance thanks to the page's fixed key.
'pages:extend'(pages) {
const login = pages.find((page) => page.path === '/login')
if (login) pages.push({ ...login, name: 'signup', path: '/signup' })
},
}, },
app: { app: {
@@ -239,7 +258,7 @@ func scaffoldClientVue(projectDir, serviceName string) error {
} }
fmt.Println("📦 Installing remaining dependencies...") fmt.Println("📦 Installing remaining dependencies...")
return runCommand(projectDir, "pnpm", "add", "ofetch", "@fernandojvideira/vue-ui-kit", "lucide-vue-next") return runCommand(projectDir, "pnpm", "add", "ofetch", "@fernandojvideira/vue-ui-kit", "@lucide/vue")
} }
// The library's theme brings its own tokens; --success/--warning are added on // The library's theme brings its own tokens; --success/--warning are added on
@@ -299,13 +318,31 @@ func patchViteConfigForTailwind(projectDir string) error {
) )
newContent = strings.Replace(newContent, "vueDevTools(),", "vueDevTools(),\n tailwindcss(),", 1) newContent = strings.Replace(newContent, "vueDevTools(),", "vueDevTools(),\n tailwindcss(),", 1)
if newContent == string(content) { // create-vue's config ends with the resolve.alias block; hang the
// optimizeDeps exclusion off its closing brace.
newContent = strings.Replace(newContent,
" '@': fileURLToPath(new URL('./src', import.meta.url)),\n },\n },\n})",
" '@': fileURLToPath(new URL('./src', import.meta.url)),\n },\n },\n"+viteOptimizeDepsExclude+"})",
1,
)
if newContent == string(content) || !strings.Contains(newContent, "optimizeDeps") {
return fmt.Errorf("could not find expected anchors in vite.config.ts") return fmt.Errorf("could not find expected anchors in vite.config.ts")
} }
return os.WriteFile(configPath, []byte(newContent), 0644) return os.WriteFile(configPath, []byte(newContent), 0644)
} }
// vue-ui-kit ships raw .vue/.ts source. Left to Vite's dependency pre-bundler,
// its index.ts gets bundled with reka-ui inlined while its .vue files import
// reka-ui from source - two module instances, so reka-ui's provide/inject
// contexts (Dialog, Tabs, Select...) can't find each other. Excluding it keeps
// every import on the one reka-ui.
const viteOptimizeDepsExclude = ` optimizeDeps: {
exclude: ['@fernandojvideira/vue-ui-kit'],
},
`
func patchTsconfigAlias(projectDir string) error { func patchTsconfigAlias(projectDir string) error {
configPath := filepath.Join(projectDir, "tsconfig.json") configPath := filepath.Join(projectDir, "tsconfig.json")
content, err := os.ReadFile(configPath) content, err := os.ReadFile(configPath)