Skip to content

Commit 7c12b95

Browse files
Merge pull request #491 from basementstudio/canary
v0.6.4
2 parents 44058b0 + 9168eb9 commit 7c12b95

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

packages/create-xmcp-app/src/index.ts

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ const program = new Command()
5252
false
5353
)
5454
.action(async (projectDir, options) => {
55+
const cloudflareFlag =
56+
options.cloudflare ||
57+
process.argv.includes("--cloudflare") ||
58+
process.argv.includes("--cf");
59+
5560
console.log(chalk.bold(`\ncreate-xmcp-app@${packageJson.version}`));
5661

5762
if (options.tailwind && !options.gpt && !options.ui) {
@@ -88,11 +93,19 @@ const program = new Command()
8893

8994
await downloadAndExtractExample(targetPath, options.example);
9095

91-
if (options.cloudflare) {
96+
if (cloudflareFlag) {
9297
applyCloudflareSettings(targetPath);
9398
}
9499

95100
console.log();
101+
if (cloudflareFlag) {
102+
console.log(
103+
`${chalk.bgHex("#F38020").white(" Cloudflare ")} ${chalk.dim(
104+
"bootstrapped for Workers deploy."
105+
)}`
106+
);
107+
console.log();
108+
}
96109
console.log("Next steps:");
97110
if (projectDir) {
98111
console.log(` cd ${chalk.cyan(projectDir)}`);
@@ -340,22 +353,30 @@ const program = new Command()
340353

341354
const spinner = ora("Creating your xmcp app...").start();
342355
try {
343-
createProject({
344-
projectPath: resolvedProjectPath,
345-
projectName,
346-
packageManager,
347-
transports: transports,
348-
packageVersion: packageJson.version,
349-
skipInstall,
350-
paths: selectedPaths,
351-
template,
352-
tailwind,
353-
cloudflare: options.cloudflare,
354-
});
356+
createProject({
357+
projectPath: resolvedProjectPath,
358+
projectName,
359+
packageManager,
360+
transports: transports,
361+
packageVersion: packageJson.version,
362+
skipInstall,
363+
paths: selectedPaths,
364+
template,
365+
tailwind,
366+
cloudflare: cloudflareFlag,
367+
});
355368

356369
spinner.succeed(chalk.green("Your xmcp app is ready"));
357370

358371
console.log();
372+
if (cloudflareFlag) {
373+
console.log(
374+
`${chalk.bgHex("#F38020").white(" Cloudflare ")} ${chalk.dim(
375+
"bootstrapped for Workers deploy."
376+
)}`
377+
);
378+
console.log();
379+
}
359380
console.log("Next steps:");
360381

361382
if (resolvedProjectPath !== process.cwd()) {

0 commit comments

Comments
 (0)