From 00fc466411873dbe171ce2da2debb7910d58c856 Mon Sep 17 00:00:00 2001 From: ebedi Date: Mon, 25 May 2026 13:35:00 +0200 Subject: [PATCH 1/2] refactor[genetor]:added allow square coner in loading and git ignore for ignore nodemodule in template --- src/generate.js | 32 +++++++++++++++---- .../ecommerce/nextjs-monolith/.gitignore | 5 +++ .../portfolio/nextjs-monolith/.gitignore | 5 +++ 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 templates/ecommerce/nextjs-monolith/.gitignore create mode 100644 templates/portfolio/nextjs-monolith/.gitignore diff --git a/src/generate.js b/src/generate.js index 63b64ee..b0c9430 100644 --- a/src/generate.js +++ b/src/generate.js @@ -45,13 +45,21 @@ export async function generateProject(config) { try { if (fs.existsSync(localTemplatePath)) { // 🟢 DEVELOPMENT MODE: Local folder found - const spinner = ora('DEV MODE: Copying local template...').start(); + const spinner = ora({ + text: 'DEV MODE: Copying local template...', + spinner: 'squareCorners', + color: 'blue' + }).start(); fs.cpSync(localTemplatePath, projectPath, { recursive: true }); spinner.succeed(`Files copied to ./${projectName}`); } else { // 🔵 PRODUCTION MODE: Fetch from GitHub const repoURI = `Ebyte-Lab/opusify-templates/${config.template}/${config.architecture}`; - const spinner = ora(`Fetching template from GitHub (${repoURI})...`).start(); + const spinner = ora({ + text: `Fetching template from GitHub (${repoURI})...`, + spinner: 'squareCorners', + color: 'blue' + }).start(); try { const emitter = tiged(repoURI, { disableCache: true, force: true }); @@ -64,7 +72,11 @@ export async function generateProject(config) { } // 3. TRANSFORM PHASE: Process Handlebars Tags - const compileSpinner = ora('Compiling template tags...').start(); + const compileSpinner = ora({ + text: 'Compiling template tags...', + spinner: 'squareCorners', + color: 'cyan' + }).start(); const allFiles = getAllFiles(projectPath); for (const file of allFiles) { @@ -84,7 +96,11 @@ export async function generateProject(config) { fs.writeFileSync(configFilePath, JSON.stringify(config, null, 2)); // 5. AUTOMATION PHASE: Install Dependencies - const installSpinner = ora('Installing dependencies (this might take a minute)...').start(); + const installSpinner = ora({ + text: 'Installing dependencies (this might take a minute)...', + spinner: 'squareCorners', + color: 'yellow' + }).start(); try { execSync('npm install', { cwd: projectPath, stdio: 'pipe' }); installSpinner.succeed('Dependencies installed successfully!'); @@ -94,7 +110,11 @@ export async function generateProject(config) { // 6. Git Initialization if (config.initGit) { - const gitSpinner = ora('Initializing Git repository...').start(); + const gitSpinner = ora({ + text: 'Initializing Git repository...', + spinner: 'squareCorners', + color: 'magenta' + }).start(); try { execSync('git init', { cwd: projectPath, stdio: 'ignore' }); execSync('git add .', { cwd: projectPath, stdio: 'ignore' }); @@ -120,4 +140,4 @@ export async function generateProject(config) { console.log(chalk.gray(error.message)); if (fs.existsSync(projectPath)) fs.rmSync(projectPath, { recursive: true, force: true }); } -} +} \ No newline at end of file diff --git a/templates/ecommerce/nextjs-monolith/.gitignore b/templates/ecommerce/nextjs-monolith/.gitignore new file mode 100644 index 0000000..7ef8c73 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/.gitignore @@ -0,0 +1,5 @@ +node_modules +.env + +# editos files +.vscode \ No newline at end of file diff --git a/templates/portfolio/nextjs-monolith/.gitignore b/templates/portfolio/nextjs-monolith/.gitignore new file mode 100644 index 0000000..7ef8c73 --- /dev/null +++ b/templates/portfolio/nextjs-monolith/.gitignore @@ -0,0 +1,5 @@ +node_modules +.env + +# editos files +.vscode \ No newline at end of file From d3dc87c39ded585ae1ce8759e484575c2f22578c Mon Sep 17 00:00:00 2001 From: ebedi Date: Mon, 25 May 2026 13:53:07 +0200 Subject: [PATCH 2/2] chore[templte]:added git iginoer to to allow to ingnorer noder module when git is initilized --- templates/saas/nextjs-monolith/.gitignore | 5 +++++ templates/saas/vite-react/.gitignore | 5 +++++ templates/school/nextjs-monolith/.gitignore | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 templates/saas/nextjs-monolith/.gitignore create mode 100644 templates/saas/vite-react/.gitignore create mode 100644 templates/school/nextjs-monolith/.gitignore diff --git a/templates/saas/nextjs-monolith/.gitignore b/templates/saas/nextjs-monolith/.gitignore new file mode 100644 index 0000000..7ef8c73 --- /dev/null +++ b/templates/saas/nextjs-monolith/.gitignore @@ -0,0 +1,5 @@ +node_modules +.env + +# editos files +.vscode \ No newline at end of file diff --git a/templates/saas/vite-react/.gitignore b/templates/saas/vite-react/.gitignore new file mode 100644 index 0000000..7ef8c73 --- /dev/null +++ b/templates/saas/vite-react/.gitignore @@ -0,0 +1,5 @@ +node_modules +.env + +# editos files +.vscode \ No newline at end of file diff --git a/templates/school/nextjs-monolith/.gitignore b/templates/school/nextjs-monolith/.gitignore new file mode 100644 index 0000000..7ef8c73 --- /dev/null +++ b/templates/school/nextjs-monolith/.gitignore @@ -0,0 +1,5 @@ +node_modules +.env + +# editos files +.vscode \ No newline at end of file