create-tamagui 1.33.1 → 1.33.3
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/helpers/cloneStarter.js +18 -17
- package/dist/helpers/cloneStarter.js.map +1 -1
- package/dist/helpers/getProjectName.js +2 -2
- package/dist/helpers/getTemplateInfo.js.map +1 -1
- package/dist/index.js +20 -19
- package/dist/index.js.map +2 -2
- package/dist/steps/next-expo-solito.js.map +1 -1
- package/dist/steps/simple-web.js.map +1 -1
- package/dist/steps/takeout.js.map +1 -1
- package/dist/templates.js.map +1 -1
- package/package.json +2 -2
|
@@ -19581,9 +19581,24 @@ var IS_TEST = process.env.NODE_ENV === "test";
|
|
|
19581
19581
|
var home = (0, import_os.homedir)();
|
|
19582
19582
|
var tamaguiDir = (0, import_path.join)(home, ".tamagui");
|
|
19583
19583
|
var targetGitDir = "";
|
|
19584
|
+
var cloneStarter = async (template, resolvedProjectPath, projectName) => {
|
|
19585
|
+
targetGitDir = IS_TEST ? (0, import_path.join)(tamaguiDir, "tamagui-test", template.repo.url.split("/").at(-1)) : (0, import_path.join)(tamaguiDir, "tamagui", template.repo.url.split("/").at(-1));
|
|
19586
|
+
console.log();
|
|
19587
|
+
await setupTamaguiDotDir(template);
|
|
19588
|
+
const starterDir = (0, import_path.join)(targetGitDir, ...template.repo.dir);
|
|
19589
|
+
console.log();
|
|
19590
|
+
console.log(
|
|
19591
|
+
`Copying starter from ${starterDir} into ${import_chalk5.default.blueBright(projectName)}...`
|
|
19592
|
+
);
|
|
19593
|
+
console.log();
|
|
19594
|
+
await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath);
|
|
19595
|
+
(0, import_child_process.execSync)(`rm -rf ${resolvedProjectPath}/.git`);
|
|
19596
|
+
console.log(import_chalk5.default.green(`${projectName} created!`));
|
|
19597
|
+
console.log();
|
|
19598
|
+
};
|
|
19584
19599
|
async function setupTamaguiDotDir(template, isRetry = false) {
|
|
19585
19600
|
const repoRoot = (0, import_path.join)(__dirname, "..", "..", "..");
|
|
19586
|
-
console.log(`Setting up ${import_chalk5.default.blueBright(
|
|
19601
|
+
console.log(`Setting up ${import_chalk5.default.blueBright(targetGitDir)}...`);
|
|
19587
19602
|
cd(repoRoot);
|
|
19588
19603
|
if (process.env.GITHUB_HEAD_REF) {
|
|
19589
19604
|
try {
|
|
@@ -19591,11 +19606,12 @@ async function setupTamaguiDotDir(template, isRetry = false) {
|
|
|
19591
19606
|
} catch {
|
|
19592
19607
|
}
|
|
19593
19608
|
}
|
|
19594
|
-
const branch = IS_TEST
|
|
19609
|
+
const branch = IS_TEST ? (
|
|
19595
19610
|
// use current branch
|
|
19596
19611
|
(await $`git rev-parse --abbrev-ref HEAD`).stdout.trim()
|
|
19597
19612
|
) : template.repo.branch;
|
|
19598
19613
|
if (IS_TEST) {
|
|
19614
|
+
console.log(`Test mode: cleaning old tamagui git dir`);
|
|
19599
19615
|
await (0, import_fs_extra.remove)(targetGitDir);
|
|
19600
19616
|
if (!await (0, import_fs_extra.pathExists)((0, import_path.join)(repoRoot, ".git"))) {
|
|
19601
19617
|
throw new Error(`Not in a git folder`);
|
|
@@ -19660,21 +19676,6 @@ ${err.stack}` : "trying from fresh."}`
|
|
|
19660
19676
|
await setupTamaguiDotDir(template, true);
|
|
19661
19677
|
}
|
|
19662
19678
|
}
|
|
19663
|
-
var cloneStarter = async (template, resolvedProjectPath, projectName) => {
|
|
19664
|
-
targetGitDir = IS_TEST ? (0, import_path.join)(tamaguiDir, "tamagui-test", template.repo.url.split("/").at(-1)) : (0, import_path.join)(tamaguiDir, "tamagui", template.repo.url.split("/").at(-1));
|
|
19665
|
-
console.log();
|
|
19666
|
-
await setupTamaguiDotDir(template);
|
|
19667
|
-
const starterDir = (0, import_path.join)(targetGitDir, ...template.repo.dir);
|
|
19668
|
-
console.log();
|
|
19669
|
-
console.log(
|
|
19670
|
-
`Copying starter from ${starterDir} into ${import_chalk5.default.blueBright(projectName)}...`
|
|
19671
|
-
);
|
|
19672
|
-
console.log();
|
|
19673
|
-
await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath);
|
|
19674
|
-
(0, import_child_process.execSync)(`rm -rf ${resolvedProjectPath}/.git`);
|
|
19675
|
-
console.log(import_chalk5.default.green(`${projectName} created!`));
|
|
19676
|
-
console.log();
|
|
19677
|
-
};
|
|
19678
19679
|
// Annotate the CommonJS export names for ESM import in node:
|
|
19679
19680
|
0 && (module.exports = {
|
|
19680
19681
|
cloneStarter
|