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
This commit is contained in:
2026-04-25 14:44:45 -04:00
parent e42987a783
commit 02da93135c
3 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -59,8 +59,8 @@ async function initProject() {
const gitignorePath = './.gitignore'; const gitignorePath = './.gitignore';
if (fs.existsSync(gitignorePath)) { if (fs.existsSync(gitignorePath)) {
const gitignore = fs.readFileSync(gitignorePath, 'utf-8'); const gitignore = fs.readFileSync(gitignorePath, 'utf-8');
if (!gitignore.includes('app/.zen/modules.generated.js')) { if (!gitignore.includes('app/.zen/')) {
fs.appendFileSync(gitignorePath, '\n# Generated by zen-modules sync\napp/.zen/modules.generated.js\n'); fs.appendFileSync(gitignorePath, '\n# Generated by zen-modules sync\napp/.zen/\n');
} }
} }
+4
View File
@@ -0,0 +1,4 @@
// AUTO-GÉNÉRÉ par `npx zen-modules sync` — ne pas modifier à la main.
'use client';
export {};
+1 -1
View File
@@ -1,5 +1,5 @@
import "@styles/globals.css"; import "@styles/globals.css";
import './.zen/modules.generated.js'; import './.zen/modules.client.js';
import { ZenProvider } from '@zen/core/features/provider'; import { ZenProvider } from '@zen/core/features/provider';
import { THEME_INIT_SCRIPT } from '@zen/core/themes'; import { THEME_INIT_SCRIPT } from '@zen/core/themes';