Skip to content

Commit 0255673

Browse files
committed
feat(cli): clearer instructions + additional resources for init cmd
1 parent a56c686 commit 0255673

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

apps/cli/src/commands/init.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const init = new Command()
4242
const { projectPath } = await prompts({
4343
type: 'text',
4444
name: 'projectPath',
45-
message: `What is the name of your project? (Include the path)`,
45+
message: `Enter the project name or relative path (e.g., 'my-app' or './apps/my-app'):`,
4646
initial: './starter-base',
4747
});
4848

@@ -89,11 +89,11 @@ export const init = new Command()
8989
]);
9090

9191
if (packageManager !== 'none') {
92-
spinner.start('Installing dependencies...');
92+
spinner.start(`Installing dependencies using ${packageManager}...`);
9393
await execa(packageManager, ['install'], {
9494
cwd: fullProjectPath,
9595
});
96-
spinner.text = 'Verifying and updating any invalid package versions if needed...';
96+
spinner.text = 'Running expo doctor to fix package version conflicts...';
9797
await execa('npx', ['expo', 'install', '--fix'], {
9898
cwd: fullProjectPath,
9999
});
@@ -110,9 +110,9 @@ export const init = new Command()
110110
spinner.start('Initializing Git repository...');
111111
try {
112112
execSync('git init', { stdio: 'inherit', cwd: fullProjectPath });
113-
console.log('Git repository initialized successfully.');
113+
spinner.succeed('Git repository initialized successfully.');
114114
} catch (error) {
115-
console.error('Failed to initialize Git repository:', error);
115+
logger.error('Failed to initialize Git repository:', error);
116116
}
117117
}
118118

@@ -132,6 +132,9 @@ export const init = new Command()
132132
console.log('Install the dependencies manually using your package manager of choice.');
133133
console.log('Then run the dev script.');
134134
}
135+
console.log('\nAdditional resources:');
136+
console.log('- Documentation: https://rnr-docs.vercel.app');
137+
console.log('- Report issues: https://github.com/mrzachnugent/react-native-reusables/issues');
135138
process.exit(0);
136139
} catch (error) {
137140
handleError(error);

0 commit comments

Comments
 (0)