From eaa72f3b2a14fd543157348b0b89ad0792283c9a Mon Sep 17 00:00:00 2001 From: vaporvee Date: Fri, 25 Jul 2025 03:12:56 +0200 Subject: [PATCH] favicon and text fixes --- index.js | 20 ++++++++++---------- package.json | 13 ++++++++----- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/index.js b/index.js index 68deec1..93ec66f 100755 --- a/index.js +++ b/index.js @@ -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); diff --git a/package.json b/package.json index 61f1ab9..67cd546 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,13 @@ { - "name": "sanity-template", - "version": "0.1.0", - "private": true, - "description": "Bun create template for Lumify web/studio monorepo setup.", + "name": "@lumify-systems/template-sanity", + "version": "1.2.1", + "publishConfig": { + "access": "restricted", + "registry": "https://npm.pkg.github.com" + }, + "description": "Template for Lumify Sanity and Next.js monorepo setup.", "bin": { - "sanity-template": "./index.js" + "template-sanity": "./index.js" }, "main": "index.js", "keywords": [