@shakil-dev/shakil-stack 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/index.js +23 -1
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -44,6 +44,12 @@ const initProject = async (name) => {
44
44
  choices: ['pnpm', 'npm', 'yarn'],
45
45
  default: 'pnpm',
46
46
  },
47
+ {
48
+ type: 'confirm',
49
+ name: 'useShadcn',
50
+ message: 'Would you like to use shadcn/ui for components?',
51
+ default: true,
52
+ },
47
53
  {
48
54
  type: 'confirm',
49
55
  name: 'installDeps',
@@ -52,7 +58,7 @@ const initProject = async (name) => {
52
58
  },
53
59
  ]);
54
60
 
55
- const { projectName, packageManager, installDeps } = answers;
61
+ const { projectName, packageManager, installDeps, useShadcn } = answers;
56
62
  const projectPath = path.resolve(process.cwd(), projectName);
57
63
 
58
64
  if (fs.existsSync(projectPath)) {
@@ -99,6 +105,22 @@ const initProject = async (name) => {
99
105
  await fs.ensureDir(path.join(projectPath, 'frontend', 'src', folder));
100
106
  }
101
107
 
108
+ // Shadcn/UI initialization
109
+ if (useShadcn) {
110
+ console.log(chalk.cyan('\nšŸŽØ Setting up shadcn/ui...'));
111
+ try {
112
+ // Using non-interactive init with default settings
113
+ // -d flag uses default options: TypeScript, Tailwind, Lucide Icons, Slate color, css variables
114
+ execSync(`npx shadcn@latest init -d`, {
115
+ cwd: path.join(projectPath, 'frontend'),
116
+ stdio: 'inherit'
117
+ });
118
+ console.log(chalk.green('āœ… shadcn/ui initialized successfully!✨'));
119
+ } catch (err) {
120
+ console.log(chalk.yellow('\nāš ļø Warning: Failed to automate shadcn/ui init. You can run "npx shadcn@latest init" in the frontend folder.'));
121
+ }
122
+ }
123
+
102
124
  spinner.start(`šŸ“‚ Finalizing root files and backend code...`);
103
125
 
104
126
  // Root Files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakil-dev/shakil-stack",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Full-stack EchoNet-style project generator CLI",
5
5
  "keywords": [
6
6
  "shakil-stack",