From 02da93135c52c247e67ef853aa6b1647db8d24ef Mon Sep 17 00:00:00 2001 From: Hyko Date: Sat, 25 Apr 2026 14:44:45 -0400 Subject: [PATCH] refactor(cli): rename generated modules file and update gitignore pattern - rename `modules.generated.js` to `modules.client.js` and add `'use client'` directive - update gitignore to ignore entire `app/.zen/` directory instead of single file - update layout import to reference new `modules.client.js` filename --- bin/cli.js | 4 ++-- templates/app/.zen/modules.client.js | 4 ++++ templates/app/layout.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 templates/app/.zen/modules.client.js diff --git a/bin/cli.js b/bin/cli.js index 39a2592..0a59c02 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -59,8 +59,8 @@ async function initProject() { const gitignorePath = './.gitignore'; if (fs.existsSync(gitignorePath)) { const gitignore = fs.readFileSync(gitignorePath, 'utf-8'); - if (!gitignore.includes('app/.zen/modules.generated.js')) { - fs.appendFileSync(gitignorePath, '\n# Generated by zen-modules sync\napp/.zen/modules.generated.js\n'); + if (!gitignore.includes('app/.zen/')) { + fs.appendFileSync(gitignorePath, '\n# Generated by zen-modules sync\napp/.zen/\n'); } } diff --git a/templates/app/.zen/modules.client.js b/templates/app/.zen/modules.client.js new file mode 100644 index 0000000..d372d21 --- /dev/null +++ b/templates/app/.zen/modules.client.js @@ -0,0 +1,4 @@ +// AUTO-GÉNÉRÉ par `npx zen-modules sync` — ne pas modifier à la main. +'use client'; + +export {}; diff --git a/templates/app/layout.js b/templates/app/layout.js index a925ecb..96da472 100644 --- a/templates/app/layout.js +++ b/templates/app/layout.js @@ -1,5 +1,5 @@ import "@styles/globals.css"; -import './.zen/modules.generated.js'; +import './.zen/modules.client.js'; import { ZenProvider } from '@zen/core/features/provider'; import { THEME_INIT_SCRIPT } from '@zen/core/themes';