create-tamagui 2.7.7 → 3.0.0-beta.643.1

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  ));
25
25
 
26
26
  // src/index.ts
27
- var import_chalk10 = __toESM(require("chalk"));
27
+ var import_chalk9 = __toESM(require("chalk"));
28
28
  var import_commander = __toESM(require("commander"));
29
29
  var import_detect_package_manager = require("detect-package-manager");
30
30
  var import_fs_extra2 = require("fs-extra");
@@ -38,7 +38,7 @@ var import_prompts4 = __toESM(require("prompts"));
38
38
  // package.json
39
39
  var package_default = {
40
40
  name: "create-tamagui",
41
- version: "2.7.6",
41
+ version: "2.7.7",
42
42
  gitHead: "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
43
43
  bin: {
44
44
  "create-tamagui": "run.js"
@@ -191,7 +191,7 @@ async function setupTamaguiDotDir(template) {
191
191
  } catch {
192
192
  }
193
193
  }
194
- const branch = template.repo.branch;
194
+ const ref = template.repo.ref;
195
195
  await (0, import_fs_extra.ensureDir)(tamaguiDir);
196
196
  const isInSubDir = template.repo.dir.length > 0;
197
197
  const sourceGitRepo = template.repo.url;
@@ -199,7 +199,7 @@ async function setupTamaguiDotDir(template) {
199
199
  if (!await (0, import_fs_extra.pathExists)(targetGitDir)) {
200
200
  console.info(`Cloning tamagui base directory`);
201
201
  console.info();
202
- const cmd = `git clone --branch ${branch} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
202
+ const cmd = `git clone --branch ${ref} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
203
203
  try {
204
204
  try {
205
205
  console.info(`$ ${cmd}`);
@@ -246,21 +246,11 @@ async function setupTamaguiDotDir(template) {
246
246
  try {
247
247
  const remoteName = getDefaultRemoteName();
248
248
  if (await (0, import_fs_extra.pathExists)((0, import_node_path.join)(targetGitDir, ".git"))) {
249
- const cmd2 = `git pull --rebase --allow-unrelated-histories --depth 1 ${remoteName} ${branch}`;
250
- try {
251
- exec(cmd2, {
252
- cwd: targetGitDir
253
- });
254
- } catch {
255
- exec(cmd2, {
256
- cwd: targetGitDir
257
- });
258
- }
249
+ exec(`git fetch --depth 1 ${remoteName} ${ref}`, { cwd: targetGitDir });
250
+ exec(`git checkout --detach FETCH_HEAD`, { cwd: targetGitDir });
259
251
  console.info();
260
252
  } else {
261
- console.warn(
262
- `Warning: ${targetGitDir} is not a git repository. Skipping pull operation.`
263
- );
253
+ console.warn(`Warning: ${targetGitDir} is not a git repository. Skipping update.`);
264
254
  }
265
255
  } catch (err) {
266
256
  await (0, import_fs_extra.remove)(targetGitDir);
@@ -377,10 +367,12 @@ var getProjectName = async (projectPath2) => {
377
367
  var import_prompts3 = __toESM(require("prompts"));
378
368
 
379
369
  // src/templates.ts
380
- var import_chalk9 = __toESM(require("chalk"));
370
+ var import_chalk8 = __toESM(require("chalk"));
381
371
 
382
- // src/steps/expo-router.ts
372
+ // src/steps/remix.ts
383
373
  var import_chalk5 = __toESM(require("chalk"));
374
+ var packageManager = "bun";
375
+ var runCommand = (scriptName) => `${packageManager} run ${scriptName}`;
384
376
  var main = async ({ isFullClone, projectName }) => {
385
377
  if (isFullClone) {
386
378
  console.info(`
@@ -388,76 +380,60 @@ var main = async ({ isFullClone, projectName }) => {
388
380
 
389
381
  visit your project:
390
382
  ${import_chalk5.default.green("cd")} ${projectName}
391
- `);
392
- }
393
- };
394
- var expo_router_default = main;
395
-
396
- // src/steps/remix.ts
397
- var import_chalk6 = __toESM(require("chalk"));
398
- var packageManager = "bun";
399
- var runCommand = (scriptName) => `${packageManager} run ${scriptName}`;
400
- var main2 = async ({ isFullClone, projectName }) => {
401
- if (isFullClone) {
402
- console.info(`
403
- ${import_chalk6.default.green.bold("Done!")} created a new project under ./${projectName}
404
-
405
- visit your project:
406
- ${import_chalk6.default.green("cd")} ${projectName}
407
383
  `);
408
384
  }
409
385
  console.info(`
410
386
  To start the Remix development server, run:
411
- ${import_chalk6.default.green(runCommand("dev"))}
387
+ ${import_chalk5.default.green(runCommand("dev"))}
412
388
  `);
413
389
  };
414
- var remix_default = main2;
390
+ var remix_default = main;
415
391
 
416
392
  // src/steps/starter-free.ts
417
- var import_chalk7 = __toESM(require("chalk"));
393
+ var import_chalk6 = __toESM(require("chalk"));
418
394
  var packageManager2 = "bun";
419
395
  var runCommand2 = (scriptName) => `${packageManager2} run ${scriptName}`;
420
- var main3 = async ({ isFullClone, projectName }) => {
396
+ var main2 = async ({ isFullClone, projectName }) => {
421
397
  console.info(`Note: you need bun for this repo.`);
422
398
  if (isFullClone) {
423
- console.info(`${import_chalk7.default.green.bold(
399
+ console.info(`${import_chalk6.default.green.bold(
424
400
  "Done!"
425
401
  )} created a new project under ./${projectName}
426
402
 
427
403
  visit your project:
428
- ${import_chalk7.default.green("cd")} ${projectName}
404
+ ${import_chalk6.default.green("cd")} ${projectName}
429
405
  `);
430
406
  }
431
407
  console.info(`
432
408
  To start the Next.js development server, run:
433
- ${import_chalk7.default.green(runCommand2("web"))}
409
+ ${import_chalk6.default.green(runCommand2("web"))}
434
410
 
435
411
  To start Expo Go for mobile development, run:
436
- ${import_chalk7.default.green(runCommand2("native"))}
412
+ ${import_chalk6.default.green(runCommand2("native"))}
437
413
 
438
414
  You can also create Expo development builds by doing:
439
415
 
440
- ${import_chalk7.default.green(`cd apps/expo`)}
416
+ ${import_chalk6.default.green(`cd apps/expo`)}
441
417
  then:
442
- ${import_chalk7.default.green(runCommand2("ios"))}
418
+ ${import_chalk6.default.green(runCommand2("ios"))}
443
419
  or...
444
- ${import_chalk7.default.green(runCommand2("android"))}
420
+ ${import_chalk6.default.green(runCommand2("android"))}
445
421
 
446
422
  Be sure to replace yourprojectsname in app.json with the uid you'd like for your app.
447
423
  `);
448
424
  };
449
- var starter_free_default = main3;
425
+ var starter_free_default = main2;
450
426
 
451
427
  // src/steps/takeout.ts
452
428
  var import_node_child_process2 = require("node:child_process");
453
429
  var import_node_fs2 = require("node:fs");
454
430
  var import_promises = __toESM(require("node:fs/promises"));
455
431
  var import_node_path3 = __toESM(require("node:path"));
456
- var import_chalk8 = __toESM(require("chalk"));
432
+ var import_chalk7 = __toESM(require("chalk"));
457
433
  var import_prompts2 = __toESM(require("prompts"));
458
434
  var packageManager3 = "bun";
459
435
  var runCommand3 = (scriptName) => `${packageManager3} run ${scriptName}`;
460
- var main4 = async ({ isFullClone, projectName, projectPath: projectPath2 }) => {
436
+ var main3 = async ({ isFullClone, projectName, projectPath: projectPath2 }) => {
461
437
  console.info(`
462
438
  ${tamaguiRainbowAsciiArt.split("\n").map((line) => ` ${line}`).join("\n")}
463
439
  ${takeoutAsciiArt}
@@ -520,37 +496,37 @@ ${takeoutAsciiArt}
520
496
  }
521
497
  if (isFullClone) {
522
498
  console.info(`
523
- ${import_chalk8.default.green.bold("Done!")} created a new project under ./${projectName}
499
+ ${import_chalk7.default.green.bold("Done!")} created a new project under ./${projectName}
524
500
 
525
501
  visit your project:
526
- ${import_chalk8.default.green(" cd")} ${projectName}
502
+ ${import_chalk7.default.green(" cd")} ${projectName}
527
503
  `);
528
504
  }
529
505
  console.info(`
530
506
  To start the Next.js development server, run:
531
- ${import_chalk8.default.green(runCommand3("web"))}
507
+ ${import_chalk7.default.green(runCommand3("web"))}
532
508
 
533
509
  To start developing with Expo for native, run:
534
- ${import_chalk8.default.green(runCommand3("native"))}
510
+ ${import_chalk7.default.green(runCommand3("native"))}
535
511
 
536
512
  To start developing for Expo dev build, run:
537
- ${import_chalk8.default.green(runCommand3("ios"))}
538
- ${import_chalk8.default.green(runCommand3("android"))}
513
+ ${import_chalk7.default.green(runCommand3("ios"))}
514
+ ${import_chalk7.default.green(runCommand3("android"))}
539
515
 
540
516
  To run Supabase scripts, cd into the supabase package:
541
- ${import_chalk8.default.green("cd supabase")}
517
+ ${import_chalk7.default.green("cd supabase")}
542
518
 
543
- ${import_chalk8.default.green("yarn reset")} - Resets local database
544
- ${import_chalk8.default.green("yarn generate")} - Generates new types
519
+ ${import_chalk7.default.green("yarn reset")} - Resets local database
520
+ ${import_chalk7.default.green("yarn generate")} - Generates new types
545
521
 
546
- Find info on the rest of the scripts in ${import_chalk8.default.cyan(`supabase/README.md`)}
522
+ Find info on the rest of the scripts in ${import_chalk7.default.cyan(`supabase/README.md`)}
547
523
 
548
524
  If you've purchased and gained access to font and icon packages, you can run:
549
- ${import_chalk8.default.green("yarn add:icon")}
550
- ${import_chalk8.default.green("yarn add:font")}
525
+ ${import_chalk7.default.green("yarn add:icon")}
526
+ ${import_chalk7.default.green("yarn add:font")}
551
527
  `);
552
528
  };
553
- var takeout_default = main4;
529
+ var takeout_default = main3;
554
530
  async function runRetryableCommand(cmd, retriesCount = 0) {
555
531
  try {
556
532
  (0, import_node_child_process2.execSync)(cmd, { stdio: "inherit" });
@@ -566,8 +542,8 @@ async function runRetryableCommand(cmd, retriesCount = 0) {
566
542
  await runRetryableCommand(cmd, retriesCount + 1);
567
543
  } else {
568
544
  console.info(
569
- import_chalk8.default.yellow(
570
- `\u26A0\uFE0F Skipping this step. You can try running this command later. The failed command was \`${import_chalk8.default.underline(
545
+ import_chalk7.default.yellow(
546
+ `\u26A0\uFE0F Skipping this step. You can try running this command later. The failed command was \`${import_chalk7.default.underline(
571
547
  cmd
572
548
  )}\`.`
573
549
  )
@@ -600,8 +576,8 @@ async function linkSupabase() {
600
576
  await linkSupabase();
601
577
  } else {
602
578
  console.info(
603
- import_chalk8.default.yellow(
604
- `\u26A0\uFE0F Skipping this step. You can try running this command later. The failed command was \`${import_chalk8.default.underline(
579
+ import_chalk7.default.yellow(
580
+ `\u26A0\uFE0F Skipping this step. You can try running this command later. The failed command was \`${import_chalk7.default.underline(
605
581
  cmd
606
582
  )}\`.`
607
583
  )
@@ -622,10 +598,11 @@ function getEnvFromSupabaseStatus(status) {
622
598
  }
623
599
 
624
600
  // src/templates.ts
601
+ var tamaguiStarterReleaseRef = "starter/v3-beta.3";
625
602
  var templates = [
626
603
  {
627
- title: `${import_chalk9.default.bold.underline(
628
- `\u{1F961} ${import_chalk9.default.magenta("Takeout")} ${import_chalk9.default.green("Free")}`
604
+ title: `${import_chalk8.default.bold.underline(
605
+ `\u{1F961} ${import_chalk8.default.magenta("Takeout")} ${import_chalk8.default.green("Free")}`
629
606
  )} - Full stack starter: https://tamagui.dev/takeout`,
630
607
  value: "takeout-free",
631
608
  type: "free",
@@ -635,13 +612,13 @@ var templates = [
635
612
  url: `https://github.com/tamagui/takeout-free`,
636
613
  sshFallback: `git@github.com:tamagui/takeout-free.git`,
637
614
  dir: [],
638
- branch: "main"
615
+ ref: "main"
639
616
  },
640
617
  extraSteps: starter_free_default
641
618
  },
642
619
  {
643
- title: `${import_chalk9.default.bold.underline(
644
- `\u{1F961} ${import_chalk9.default.magenta("Takeout")} ${import_chalk9.default.red("Pro")}`
620
+ title: `${import_chalk8.default.bold.underline(
621
+ `\u{1F961} ${import_chalk8.default.magenta("Takeout")} ${import_chalk8.default.red("Pro")}`
645
622
  )} - Full featured starter: https://tamagui.dev/takeout`,
646
623
  value: `takeout-pro`,
647
624
  type: "premium",
@@ -651,13 +628,13 @@ var templates = [
651
628
  url: `https://github.com/tamagui/takeout2`,
652
629
  sshFallback: `git@github.com:tamagui/takeout2.git`,
653
630
  dir: [],
654
- branch: "main"
631
+ ref: "main"
655
632
  },
656
633
  extraSteps: takeout_default
657
634
  },
658
635
  {
659
- title: `${import_chalk9.default.bold.underline(
660
- `\u{1F961} ${import_chalk9.default.magenta("Takeout")} ${import_chalk9.default.yellow("Pro Classic")}`
636
+ title: `${import_chalk8.default.bold.underline(
637
+ `\u{1F961} ${import_chalk8.default.magenta("Takeout")} ${import_chalk8.default.yellow("Pro Classic")}`
661
638
  )} - Original Pro starter: https://tamagui.dev/takeout`,
662
639
  value: `takeout-pro-classic`,
663
640
  type: "premium",
@@ -667,24 +644,10 @@ var templates = [
667
644
  url: `https://github.com/tamagui/takeout`,
668
645
  sshFallback: `git@github.com:tamagui/takeout.git`,
669
646
  dir: [],
670
- branch: "main"
647
+ ref: "main"
671
648
  },
672
649
  extraSteps: takeout_default
673
650
  },
674
- {
675
- title: `Expo Router - Expo with file-based routing`,
676
- value: "expo-router",
677
- type: "free",
678
- hidden: false,
679
- packageManager: "bun",
680
- repo: {
681
- url: `https://github.com/tamagui/tamagui`,
682
- sshFallback: `git@github.com:tamagui/tamagui.git`,
683
- dir: ["code", "starters", "expo-router"],
684
- branch: "main"
685
- },
686
- extraSteps: expo_router_default
687
- },
688
651
  {
689
652
  title: `Remix - Remix with Vite`,
690
653
  value: "remix",
@@ -695,7 +658,7 @@ var templates = [
695
658
  url: `https://github.com/tamagui/tamagui`,
696
659
  sshFallback: `git@github.com:tamagui/tamagui.git`,
697
660
  dir: ["code", "starters", "remix"],
698
- branch: "main"
661
+ ref: tamaguiStarterReleaseRef
699
662
  },
700
663
  extraSteps: remix_default
701
664
  },
@@ -709,7 +672,7 @@ var templates = [
709
672
  url: process.env.STARTER_FREE_REPO_SOURCE || `https://github.com/tamagui/starter-free.git`,
710
673
  sshFallback: `git@github.com:tamagui/starter-free.git`,
711
674
  dir: [],
712
- branch: "main"
675
+ ref: "main"
713
676
  },
714
677
  extraSteps: starter_free_default
715
678
  }
@@ -776,11 +739,11 @@ var program = new import_commander.default.Command(package_default.name).version
776
739
  "Choose between four or more starter templates.",
777
740
  ""
778
741
  ).allowUnknownOption().usage(
779
- `${import_chalk10.default.green("<project-directory>")} [options]
742
+ `${import_chalk9.default.green("<project-directory>")} [options]
780
743
 
781
744
  Example usage:
782
745
 
783
- ${import_chalk10.default.blueBright(`npx ${package_default.name} next-expo`)}`
746
+ ${import_chalk9.default.blueBright(`npx ${package_default.name} next-expo`)}`
784
747
  ).parse(process.argv);
785
748
  if (process.argv.includes("--version")) {
786
749
  console.info(package_default.version);
@@ -802,14 +765,14 @@ async function run() {
802
765
  }
803
766
  console.info();
804
767
  console.info(
805
- import_chalk10.default.bold(
768
+ import_chalk9.default.bold(
806
769
  ' Note: You may need to run "npm create tamagui@latest" to get the latest version!'
807
770
  )
808
771
  );
809
772
  console.info();
810
773
  console.info();
811
774
  console.info(tamaguiRainbowAsciiArt);
812
- console.info(import_chalk10.default.bold("Creating tamagui app..."));
775
+ console.info(import_chalk9.default.bold("Creating tamagui app..."));
813
776
  const gitVersionString = Number.parseFloat(
814
777
  (0, import_node_child_process3.execSync)(`git --version`).toString().replace(`git version `, "").trim()
815
778
  );
@@ -845,33 +808,33 @@ Opening Takeout website - once you purchase you can restart the create process.
845
808
  const { valid, problems } = validateNpmName(projectName);
846
809
  if (!valid) {
847
810
  console.error(
848
- `Could not create a project called ${import_chalk10.default.red(
811
+ `Could not create a project called ${import_chalk9.default.red(
849
812
  `"${projectName}"`
850
813
  )} because of npm naming restrictions:`
851
814
  );
852
- problems.forEach((p) => console.error(` ${import_chalk10.default.red.bold("*")} ${p}`));
815
+ problems.forEach((p) => console.error(` ${import_chalk9.default.red.bold("*")} ${p}`));
853
816
  process.exit(1);
854
817
  }
855
818
  if (import_node_fs3.default.existsSync(resolvedProjectPath)) {
856
819
  console.info();
857
820
  console.info(
858
- import_chalk10.default.red("\u{1F6A8} [tamagui] error"),
859
- `You tried to make a project called ${import_chalk10.default.underline(
860
- import_chalk10.default.blueBright(projectName)
861
- )}, but a folder with that name already exists: ${import_chalk10.default.blueBright(
821
+ import_chalk9.default.red("\u{1F6A8} [tamagui] error"),
822
+ `You tried to make a project called ${import_chalk9.default.underline(
823
+ import_chalk9.default.blueBright(projectName)
824
+ )}, but a folder with that name already exists: ${import_chalk9.default.blueBright(
862
825
  resolvedProjectPath
863
826
  )}
864
827
 
865
- ${import_chalk10.default.bold(import_chalk10.default.red(`Please pick a different project name \u{1F978}`))}`
828
+ ${import_chalk9.default.bold(import_chalk9.default.red(`Please pick a different project name \u{1F978}`))}`
866
829
  );
867
830
  console.info();
868
831
  console.info();
869
832
  process.exit(1);
870
833
  }
871
834
  console.info();
872
- console.info(`Creating a new tamagui app ${import_chalk10.default.blueBright(resolvedProjectPath)}...`);
835
+ console.info(`Creating a new tamagui app ${import_chalk9.default.blueBright(resolvedProjectPath)}...`);
873
836
  import_node_fs3.default.mkdirSync(resolvedProjectPath);
874
- console.info(import_chalk10.default.green(`${projectName} folder created.`));
837
+ console.info(import_chalk9.default.green(`${projectName} folder created.`));
875
838
  try {
876
839
  await cloneStarter(template, resolvedProjectPath, projectName);
877
840
  process.chdir(resolvedProjectPath);
@@ -900,7 +863,7 @@ ${e}`);
900
863
  projectPath: resolvedProjectPath
901
864
  });
902
865
  console.info();
903
- console.info(import_chalk10.default.gray(tamaguiDuckAsciiArt));
866
+ console.info(import_chalk9.default.gray(tamaguiDuckAsciiArt));
904
867
  process.exit(0);
905
868
  } catch (error) {
906
869
  console.error("An unexpected error occurred:", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tamagui",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.643.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "bin": {
6
6
  "create-tamagui": "run.js"
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@playwright/test": "1.58.2",
45
- "@tamagui/build": "2.7.7",
45
+ "@tamagui/build": "3.0.0-beta.643.1",
46
46
  "@types/node": "^22.1.0",
47
47
  "@types/opener": "^1.4.3",
48
48
  "@types/prompts": "2.0.1",