create-tamagui 1.2.13 → 1.2.15

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.
package/dist/index.js CHANGED
@@ -45200,7 +45200,7 @@ var globby2 = Object.assign(function globby3(patterns, options) {
45200
45200
  // package.json
45201
45201
  var package_default = {
45202
45202
  name: "create-tamagui",
45203
- version: "1.2.12",
45203
+ version: "1.2.14",
45204
45204
  bin: "./run.js",
45205
45205
  main: "dist",
45206
45206
  files: [
@@ -45234,7 +45234,7 @@ var package_default = {
45234
45234
  },
45235
45235
  devDependencies: {
45236
45236
  "@playwright/test": "^1.29.0",
45237
- "@tamagui/build": "^1.2.12",
45237
+ "@tamagui/build": "^1.2.14",
45238
45238
  "@types/async-retry": "1.4.2",
45239
45239
  "@types/cross-spawn": "^6.0.2",
45240
45240
  "@types/node": "^16.11.9",
@@ -45337,6 +45337,14 @@ async function run() {
45337
45337
  console.log(`Run ${import_chalk4.default.cyan(`${program.name()} --help`)} to see all options.`);
45338
45338
  process.exit(1);
45339
45339
  }
45340
+ const shouldGitInit = IS_TEST || Boolean(
45341
+ (await (0, import_prompts.default)({
45342
+ type: "confirm",
45343
+ name: "gitInit",
45344
+ message: "Do you want to use git?",
45345
+ initial: true
45346
+ })).gitInit
45347
+ );
45340
45348
  const resolvedProjectPath = import_path.default.resolve(process.cwd(), projectPath);
45341
45349
  const projectName = import_path.default.basename(resolvedProjectPath);
45342
45350
  const { valid, problems } = validateNpmName(projectName);
@@ -45370,10 +45378,6 @@ ${import_chalk4.default.bold(import_chalk4.default.red(`Please pick a different
45370
45378
  import_fs.default.mkdirSync(resolvedProjectPath);
45371
45379
  console.log(import_chalk4.default.green(`${projectName} folder created.`));
45372
45380
  try {
45373
- let gitInit2 = function() {
45374
- return $`git init`;
45375
- };
45376
- var gitInit = gitInit2;
45377
45381
  const home = (0, import_os.homedir)();
45378
45382
  const tamaguiDir = (0, import_path.join)(home, ".tamagui");
45379
45383
  const repoRoot = (0, import_path.join)(__dirname, "..", "..", "..");
@@ -45450,18 +45454,8 @@ ${err.stack}` : "trying from fresh."}`
45450
45454
  await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath);
45451
45455
  console.log(import_chalk4.default.green(`${projectName} created!`));
45452
45456
  cd(resolvedProjectPath);
45453
- if (IS_TEST) {
45454
- await gitInit2();
45455
- } else {
45456
- const res2 = await (0, import_prompts.default)({
45457
- type: "confirm",
45458
- name: "gitInit",
45459
- message: "Do you want to use git?",
45460
- initial: true
45461
- });
45462
- if (res2.gitInit) {
45463
- await gitInit2();
45464
- }
45457
+ if (shouldGitInit) {
45458
+ await $`git init`;
45465
45459
  }
45466
45460
  } catch (e) {
45467
45461
  console.error(`[tamagui] Failed to copy example into ${resolvedProjectPath}