Public Access
Ship the client Dockerfile with generated Nuxt apps; bump to v0.2.0
A generated monorepo's docker-compose.yml already built apps/client from apps/client/Dockerfile, but the client overlay only embedded app/ and public/, so the file never existed and `docker compose build client` failed on every fresh project. The client-nuxt sync job now embeds the template's Dockerfile too, and the Nuxt scaffold rewrites its pnpm pin to the locally detected version - the one that produces the generated project's lockfile - the same way it already stamps packageManager. Bumps the submodule to the template commit that mounts ~/.npmrc as a build secret for the registry token, and the Makefile VERSION to v0.2.0 for the release. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
b3ea1013bc
commit
2f1ad93a74
5 files changed
+11
-4
No files matched your search
@@ -1,5 +1,5 @@
|
||||
PKG_NAME := git.fernandovideira.com/FernandoJVideira/draft
|
||||
VERSION := v0.1.0
|
||||
VERSION := v0.2.0
|
||||
GO_SOURCES := $(shell find . -name '*.go' -not -path './assets/testdata/*')
|
||||
|
||||
.PHONY: version build windows win-arm linux mac prepare-embed clean
|
||||
|
||||
@@ -85,7 +85,7 @@ draft new client
|
||||
3. Scaffolds the base app via the official tooling (`nuxi init` for Nuxt, `create-vue` for Vue), so the generated boilerplate, dependency versions, and lockfile are always current rather than pinned by Draft
|
||||
4. Layers a Draft-maintained overlay on top: an auth store (login/logout/register/token refresh), route guards, API composable, and pages for login/signup/profile/organizations/email verification/invites — all wired up to talk to a Draft-generated API out of the box
|
||||
|
||||
Both frameworks produce a comparable app: [`vue-ui-kit`](https://git.fernandovideira.com/FernandoJVideira/vue-ui-kit) (installed from its own Gitea npm registry - see its README for the one-time `.npmrc` token setup) + Tailwind, the same component library and theme tokens on either framework.
|
||||
Both frameworks produce a comparable app: [`vue-ui-kit`](https://git.fernandovideira.com/FernandoJVideira/vue-ui-kit) (installed from its own Gitea npm registry - see its README for the one-time `.npmrc` token setup) + Tailwind, the same component library and theme tokens on either framework. The generated Nuxt client's Dockerfile mounts that `~/.npmrc` as a build secret (wired up in the monorepo's `docker-compose.yml`), so container builds resolve the package without baking the token into the image.
|
||||
|
||||
### Create a New Monorepo Project
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule assets/testdata/template updated: 41df89929f...70067c968a.
@@ -68,8 +68,15 @@ func scaffoldClientNuxt(projectDir, serviceName string) error {
|
||||
return fmt.Errorf("error running nuxi init: %w", err)
|
||||
}
|
||||
|
||||
version, err := pnpmVersion()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error detecting pnpm version: %w", err)
|
||||
}
|
||||
replacements := map[string]string{
|
||||
"App Template": serviceName,
|
||||
// The overlay's Dockerfile pins the pnpm that produced the template's
|
||||
// lockfile; the generated project's lockfile comes from the local pnpm.
|
||||
"[email protected]": "pnpm@" + version,
|
||||
}
|
||||
if err := copyEmbeddedDir("embedded/client-nuxt", projectDir, replacements); err != nil {
|
||||
return fmt.Errorf("error copying client overlay: %w", err)
|
||||
|
||||
@@ -39,7 +39,7 @@ var jobs = []syncJob{
|
||||
templateName: "client-nuxt",
|
||||
sourceDir: "assets/testdata/template/apps/client",
|
||||
targetDir: "assets/embedded/client-nuxt",
|
||||
includePrefixes: []string{"app/", "public/"},
|
||||
includePrefixes: []string{"app/", "public/", "Dockerfile"},
|
||||
},
|
||||
{
|
||||
templateName: "client-vue",
|
||||
|
||||
Reference in new issue
Block a user