Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"scripts": {
"build": "tsc",
"start": "node dist/cli.js",
"test": "jest"
},
"jest": {
Expand Down
5 changes: 3 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ program
cloneArgs.push(...template.options);
}
cloneArgs.push(templateRepoUrl, projectPath);
await execa('git', cloneArgs);
await execa('git', cloneArgs, { stdio: 'inherit' });
console.log('✅ Template cloned successfully.');

// Remove the .git folder from the *new* project
Expand Down Expand Up @@ -128,9 +128,10 @@ program
console.log('ℹ️ No package.json found in template, skipping customization.');
}

const packageManager = template.packageManager || "npm";
// Install dependencies
console.log('📦 Installing dependencies... (This may take a moment)');
await execa('npm', ['install'], { cwd: projectPath });
await execa(packageManager, ['install'], { cwd: projectPath, stdio: 'inherit' });
console.log('✅ Dependencies installed.');

// Let the user know the project was created successfully
Expand Down
9 changes: 6 additions & 3 deletions src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ const templates = [
{
name: "starter",
description: "A starter template for Patternfly react typescript project",
repo: "https://github.com/patternfly/patternfly-react-seed.git"
repo: "https://github.com/patternfly/patternfly-react-seed.git",
packageManager: "yarn"
},
{
name: "compass-starter",
description: "A starter template for Patternfly compass theme typescript project",
repo: "https://github.com/patternfly/patternfly-react-seed.git",
options: ["--single-branch", "--branch", "compass_theme"]
options: ["--single-branch", "--branch", "compass_theme"],
packageManager: "yarn"
},
{
name: "nextjs-starter",
description: "A starter template for Patternfly nextjs project",
repo: "git@github.com:patternfly/patternfly-nextjs-seed.git"
repo: "git@github.com:patternfly/patternfly-nextjs-seed.git",
packageManager: "yarn"
},
{
name: "ai_enabled_starter",
Expand Down