favicon and text fixes

This commit is contained in:
2025-07-25 03:12:56 +02:00
parent b32f57a61c
commit eaa72f3b2a
2 changed files with 18 additions and 15 deletions

View File

@@ -103,7 +103,7 @@ async function main() {
await p.tasks([
{
title: `${color.yellow('📁 Copying template contents to root...')}`,
title: `${color.yellow('📁 Copying template contents to root')}`,
task: async () => {
const __dirname = path.dirname(new URL(import.meta.url).pathname);
const templateDir = path.resolve(__dirname, 'template');
@@ -113,14 +113,14 @@ async function main() {
},
},
{
title: `${color.green(`📦 Installing dependencies with ${project.packageManager}...`)}`,
title: `${color.green(`📦 Installing dependencies with ${project.packageManager}`)}`,
task: async () => {
await runCommand(project.packageManager === 'bun' ? 'bun' : 'npm', ['install'], rootDir);
return 'Dependencies installed successfully';
},
},
{
title: `${color.cyan('🔑 Checking Sanity login status...')}`,
title: `${color.cyan('🔑 Checking Sanity login status')}`,
task: async () => {
await fs.ensureDir(studioDir);
let loggedIn = false;
@@ -146,7 +146,7 @@ async function main() {
},
},
{
title: `${color.magenta('🛠️ Creating Sanity project...')}`,
title: `${color.magenta('🛠️ Creating Sanity project')}`,
task: async () => {
spawnSync(pmx, [
"sanity",
@@ -205,7 +205,7 @@ async function main() {
},
},
{
title: `${color.green('🔐 Creating Sanity viewer token...')}`,
title: `${color.green('🔐 Creating Sanity viewer token')}`,
task: async () => {
if (!(await fs.pathExists(studioDir))) throw new Error(`Studio directory not found at ${studioDir}`);
const addOut = await new Promise((res, rej) => {
@@ -234,9 +234,9 @@ async function main() {
if (project.faviconPath && project.faviconPath.trim()) {
await p.tasks([
{
title: `${color.yellow('🌟 Generating favicon...')}`,
title: `${color.yellow('🌟 Generating favicon')}`,
task: async () => {
await runCommand(pmx, ['bun-create-favicon', project.faviconPath, 'packages/ui/favicon/'], rootDir);
await runCommand(pmx, ['create', "favicon", project.faviconPath, 'packages/ui/favicon'], rootDir);
await fs.copy(path.join(rootDir, 'packages/ui/favicon/'), path.join(rootDir, 'apps/client/public/'), { overwrite: true });
await fs.copy(path.join(rootDir, 'packages/ui/favicon/'), path.join(rootDir, 'apps/studio/static/'), { overwrite: true });
return 'Favicon generated and copied!';
@@ -269,7 +269,7 @@ async function main() {
if (project.shouldGit) {
await p.tasks([
{
title: `${color.green('🌱 Setting up Git repository...')}`,
title: `${color.green('🌱 Setting up Git repository')}`,
task: async () => {
await runCommand('git', ['config', '--global', 'init.defaultBranch', 'main'], process.cwd());
await runCommand('git', ['init'], rootDir);
@@ -289,13 +289,13 @@ async function main() {
);
await runCommand('xdg-open', [githubUrl], process.cwd());
await p.text({
message: 'Press Enter after you have created the GitHub repository to continue...',
message: 'Press Enter after you have created the GitHub repository to continue',
placeholder: '',
validate: () => undefined,
});
await p.tasks([
{
title: `${color.magenta('🚀 Pushing to GitHub...')}`,
title: `${color.magenta('🚀 Pushing to GitHub')}`,
task: async () => {
await runCommand('git', ['remote', 'add', 'origin', `git@github.com:${org}/${kebabName}.git`], rootDir);
await runCommand('git', ['push', '-u', 'origin', 'main'], rootDir);