create-catalyst-app 0.0.1-beta.19 → 0.0.1-beta.20

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/package.json +1 -1
  2. package/scripts/cli.cjs +18 -35
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-catalyst-app",
3
3
  "bin": "scripts/cli.cjs",
4
- "version": "0.0.1-beta.19",
4
+ "version": "0.0.1-beta.20",
5
5
  "description": "cli package to scaffold Catalyst application",
6
6
  "dependencies": {
7
7
  "commander": "^8.2.0",
package/scripts/cli.cjs CHANGED
@@ -110,14 +110,28 @@ const program = new Commander.Command()
110
110
  extractSubdirectory(packageFilePath)
111
111
  createGitignore(projectName)
112
112
 
113
- if (tailWindSupport) setupTailwind(projectName)
114
- if (mcpSupport) setupMcp(projectName)
115
-
116
113
  execSync(
117
- `cd ${projectName} && npm i && npm pkg set name=${projectName} ${projectDescription ? `description="${projectDescription}"` : ""} && git init --quiet && git add . && git commit -m "initial commit from Create Catalyst App"`,
114
+ `cd ${projectName} && npm i && npm pkg set name=${projectName} ${projectDescription ? `description="${projectDescription}"` : ""} && git init --quiet`,
118
115
  { stdio: "inherit" }
119
116
  )
120
117
 
118
+ if (tailWindSupport) {
119
+ execSync(`cd ${projectName} && npm i tailwindcss@4.1.4 @tailwindcss/postcss@4.1.4`, {
120
+ stdio: "inherit",
121
+ })
122
+ }
123
+
124
+ if (mcpSupport) {
125
+ execSync(`cd ${projectName} && npm i @modelcontextprotocol/sdk`, { stdio: "inherit" })
126
+ }
127
+
128
+ execSync(
129
+ `cd ${projectName} && git add . && git commit -m "initial commit from Create Catalyst App"`,
130
+ {
131
+ stdio: "inherit",
132
+ }
133
+ )
134
+
121
135
  console.log(`\n${green(bold("Success!"))} created ${projectName} at ${projectPath}`)
122
136
  console.log("Inside this directory, you can run the following commands.")
123
137
 
@@ -300,37 +314,6 @@ async function promptMcp() {
300
314
  return response.mcp
301
315
  }
302
316
 
303
- async function setupTailwind(projectName) {
304
- try {
305
- const packageJsonPath = path.join(process.cwd(), projectName, "package.json")
306
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
307
- packageJson.dependencies = {
308
- ...(packageJson.dependencies || {}),
309
- tailwindcss: "^4.1.4",
310
- "@tailwindcss/postcss": "^4.1.4",
311
- }
312
- fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))
313
- } catch (error) {
314
- console.log("Error while setting up tailwind:", error)
315
- process.exit(1)
316
- }
317
- }
318
-
319
- async function setupMcp(projectName) {
320
- try {
321
- const packageJsonPath = path.join(process.cwd(), projectName, "package.json")
322
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
323
- packageJson.dependencies = {
324
- ...(packageJson.dependencies || {}),
325
- "@modelcontextprotocol/sdk": "^1.12.3",
326
- }
327
- fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))
328
- } catch (error) {
329
- console.log("Error while setting up MCP:", error)
330
- process.exit(1)
331
- }
332
- }
333
-
334
317
  function validateOptions(cmd) {
335
318
  // Validate language option
336
319
  if (cmd.lang && !["js", "ts"].includes(cmd.lang.toLowerCase())) {