From 793e8989270a0d6c3405f2fd10f50612ce029403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Ollivier?= Date: Wed, 1 Jan 2025 11:52:00 +0100 Subject: [PATCH 1/2] feat: add layer generation command --- src/utils/templates.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/utils/templates.ts b/src/utils/templates.ts index 368b21f16..dd68c1c7b 100644 --- a/src/utils/templates.ts +++ b/src/utils/templates.ts @@ -112,6 +112,15 @@ const page: Template = ({ name, nuxtOptions }) => ({ `, }) +const layer: Template = ({ name, nuxtOptions }) => { + return { + path: resolve(nuxtOptions.srcDir, `layers/${name}/nuxt.config.ts`), + contents: ` +export default defineNuxtConfig({}) +`, + } +} + export const templates = { api, plugin, @@ -120,6 +129,7 @@ export const templates = { middleware, layout, page, + layer, } as Record // -- internal utils -- From d5630d30de80d18b2ee620928a7b7d3133052cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Ollivier?= Date: Wed, 1 Jan 2025 11:52:08 +0100 Subject: [PATCH 2/2] chore: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 11e1d5edc..0deb7539b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ pnpm i # Generate type stubs pnpm dev:prepare -# Go the the playground directory +# Go to the playground directory cd playground # And run any commands