Skip to content

Commit

Permalink
Improved success output for create-turbo (#222)
Browse files Browse the repository at this point in the history
* improve success output for create-turbo within current directory

* update docs link in create-turbo success output

* check projectDirIsCurrentDir for success output log
  • Loading branch information
seanyusa authored Dec 13, 2021
1 parent e3c78c7 commit 3439d75
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions create-turbo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,46 +199,45 @@ async function run() {
process.chdir(projectDir);
tryGitInit(relativeProjectDir);

if (projectDirIsCurrentDir) {
console;
console.log(
`${chalk.bold(
turboGradient(">>> Success!")
)} Check the README for development and deploy instructions!`
);
} else {
console.log(
`${chalk.bold(
turboGradient(">>> Success!")
)} Your new Turborepo is ready. `
);
console.log();
console.log(`To build all apps and packages, run the following:`);
console.log();
console.log(
`${chalk.bold(turboGradient(">>> Success!"))} Your new Turborepo is ready. `
);
console.log();
console.log(`To build all apps and packages, run the following:`);
console.log();
if (!projectDirIsCurrentDir) {
console.log(` cd ${relativeProjectDir}`);
console.log(` ${answers.packageManager} run build`);
console.log();
console.log(`To develop all apps and packages, run the following:`);
console.log();
}
console.log(` ${answers.packageManager} run build`);
console.log();
console.log(`To develop all apps and packages, run the following:`);
console.log();
if (!projectDirIsCurrentDir) {
console.log(` cd ${relativeProjectDir}`);
console.log(` ${answers.packageManager} run dev`);
console.log();
console.log(`Turborepo will cache locally by default. For an additional`);
console.log(`speed boost, enable Remote Caching (beta) with Vercel by`);
console.log(`entering the following commands:`);
console.log();
}
console.log(` ${answers.packageManager} run dev`);
console.log();
console.log(`Turborepo will cache locally by default. For an additional`);
console.log(`speed boost, enable Remote Caching (beta) with Vercel by`);
console.log(`entering the following commands:`);
console.log();
if (!projectDirIsCurrentDir) {
console.log(` cd ${relativeProjectDir}`);
console.log(` npx turbo login`);
console.log();
}
console.log(` npx turbo login`);
console.log();
if (projectDirIsCurrentDir) {
console.log(`For more info, checkout the README`);
} else {
console.log(
`For more info, checkout the README in ${chalk.bold(relativeProjectDir)}`
);
console.log(
`as well as the official Turborepo docs ${chalk.underline(
"https://turborepo.org"
)}`
);
}
console.log(
`as well as the official Turborepo docs ${chalk.underline(
"https://turborepo.org/docs"
)}`
);
}

const update = checkForUpdate(cliPkgJson).catch(() => null);
Expand Down

1 comment on commit 3439d75

@vercel
Copy link

@vercel vercel bot commented on 3439d75 Dec 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.