Compare commits

...

2 Commits

Author SHA1 Message Date
hykocx f80d32eb92 chore: bump version from 1.3.3 to 1.3.4 2026-04-14 20:02:07 -04:00
hykocx f3d45bad17 feat(cli): auto-copy .env from @zen/core template after install
Automatically copies `.env.example` from the installed `@zen/core`
package to `.env` in the project root if it doesn't already exist.
This removes the need for users to manually locate and configure
environment variables. Updated the post-install instructions to
reflect the new behavior.
2026-04-14 20:01:55 -04:00
3 changed files with 11 additions and 5 deletions
+8 -2
View File
@@ -127,9 +127,15 @@ export default nextConfig;
execSync('npm install @zen/core', { stdio: 'inherit' }); execSync('npm install @zen/core', { stdio: 'inherit' });
done('@zen/core installed'); done('@zen/core installed');
const envExample = path.resolve(process.cwd(), 'node_modules/@zen/core/.env.example');
const envDest = path.resolve(process.cwd(), '.env');
if (fs.existsSync(envExample) && !fs.existsSync(envDest)) {
fs.copyFileSync(envExample, envDest);
done('Created .env from @zen/core template');
}
console.log(`\n ${c.green}${c.bold}Project ready.${c.reset} Next steps:\n`); console.log(`\n ${c.green}${c.bold}Project ready.${c.reset} Next steps:\n`);
console.log(` ${c.dim}1.${c.reset} Configure environment variables`); console.log(` ${c.dim}1.${c.reset} Fill in the environment variables in ${c.cyan}.env${c.reset}`);
console.log(` ${c.dim}https://git.hyko.cx/zen/core${c.reset}`);
console.log(` ${c.dim}2.${c.reset} Initialize the database`); console.log(` ${c.dim}2.${c.reset} Initialize the database`);
console.log(` ${c.dim}npx zen-db init${c.reset}\n`); console.log(` ${c.dim}npx zen-db init${c.reset}\n`);
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "@zen/start", "name": "@zen/start",
"version": "1.3.3", "version": "1.3.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@zen/start", "name": "@zen/start",
"version": "1.3.3", "version": "1.3.4",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"fs-extra": "^11.2.0" "fs-extra": "^11.2.0"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@zen/start", "name": "@zen/start",
"version": "1.3.3", "version": "1.3.4",
"description": "CLI pour créer un projet Next.js avec le CMS @zen/core", "description": "CLI pour créer un projet Next.js avec le CMS @zen/core",
"repository": { "repository": {
"type": "git", "type": "git",