Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/little-files-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rnef/create-app': patch
---

chore: simplify welcome message and improve prompts
13 changes: 9 additions & 4 deletions packages/create-app/src/lib/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
replacePlaceholder,
} from './utils/edit-template.js';
import { copyDirSync, isEmptyDirSync, removeDirSync } from './utils/fs.js';
import { printLogo } from './utils/logo.js';
import { rewritePackageJson } from './utils/package-json.js';
import { parseCliOptions } from './utils/parse-cli-options.js';
import { parsePackageInfo } from './utils/parsers.js';
Expand Down Expand Up @@ -58,7 +57,6 @@ export async function run() {
return;
}

printLogo(version);
printWelcomeMessage();

const projectName =
Expand Down Expand Up @@ -117,7 +115,13 @@ export async function run() {
renameCommonFiles(absoluteTargetDir);
replacePlaceholder(absoluteTargetDir, projectName);
rewritePackageJson(absoluteTargetDir, projectName);
createConfig(absoluteTargetDir, platforms, plugins, bundler, remoteCacheProvider);
createConfig(
absoluteTargetDir,
platforms,
plugins,
bundler,
remoteCacheProvider
);
loader.stop('Applied template, platforms and plugins.');

await gitInitStep(absoluteTargetDir, version);
Expand Down Expand Up @@ -209,7 +213,8 @@ export function formatConfig(
)
.join('\n')}

export default {${pluginsWithImports
export default {${
pluginsWithImports
? `
plugins: [
${pluginsWithImports
Expand Down
34 changes: 0 additions & 34 deletions packages/create-app/src/lib/utils/logo.ts

This file was deleted.

10 changes: 6 additions & 4 deletions packages/create-app/src/lib/utils/prompts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
color,
intro,
note,
outro,
Expand All @@ -9,6 +10,7 @@ import {
RnefError,
type SupportedRemoteCacheProviders,
} from '@rnef/tools';
import { vice } from 'gradient-string';
import path from 'path';
import type { TemplateInfo } from '../templates.js';
import { validateProjectName } from '../validate-project-name.js';
Expand Down Expand Up @@ -45,7 +47,7 @@ export function printVersionMessage() {

export function printWelcomeMessage() {
console.log('');
intro(`Hello There!`);
intro(`Welcome to ${color.bold(vice('React Native Enterprise Framework'))}!`);
}

export function printByeMessage(targetDir: string) {
Expand Down Expand Up @@ -103,7 +105,7 @@ export function promptPlatforms(
);

return promptMultiselect({
message: 'Select platforms:',
message: 'What platforms do you want to start with?',
initialValues: defaultPlatforms,
// @ts-expect-error todo
options: platforms.map((platform) => ({
Expand Down Expand Up @@ -139,7 +141,7 @@ export function promptBundlers(
}

return promptSelect({
message: 'Select bundler:',
message: 'Which bundler do you want to use?',
initialValues: [bundlers[0]],
// @ts-expect-error todo fixup type
options: bundlers.map((bundler) => ({
Expand All @@ -151,7 +153,7 @@ export function promptBundlers(

export function promptRemoteCacheProvider(): Promise<SupportedRemoteCacheProviders | null> {
return promptSelect({
message: 'Select remote cache provider:',
message: 'Which remote cache provider do you want to use?',
initialValue: 'github-actions',
options: [
{
Expand Down