chore: tweak console output for init.ts script (#708)
This commit is contained in:
@@ -29,7 +29,7 @@ const CONFIRM_EMPTY_MESSAGE =
|
|||||||
"The target directory is not empty (files could get overwritten). Do you want to continue anyway?";
|
"The target directory is not empty (files could get overwritten). Do you want to continue anyway?";
|
||||||
|
|
||||||
const USE_TWIND_MESSAGE =
|
const USE_TWIND_MESSAGE =
|
||||||
"Do you want to use 'twind' (https://twind.dev/) for styling?";
|
"Fresh has built in support for styling using Tailwind CSS. Do you want to use this?";
|
||||||
|
|
||||||
const USE_VSCODE_MESSAGE = "Do you use VS Code?";
|
const USE_VSCODE_MESSAGE = "Do you use VS Code?";
|
||||||
|
|
||||||
@@ -42,6 +42,12 @@ if (flags._.length !== 1) {
|
|||||||
error(help);
|
error(help);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
`\n%c 🍋 Fresh: the next-gen web framework. %c\n`,
|
||||||
|
"background-color: #86efac; color: black; font-weight: bold",
|
||||||
|
"",
|
||||||
|
);
|
||||||
|
|
||||||
const unresolvedDirectory = Deno.args[0];
|
const unresolvedDirectory = Deno.args[0];
|
||||||
const resolvedDirectory = resolve(unresolvedDirectory);
|
const resolvedDirectory = resolve(unresolvedDirectory);
|
||||||
|
|
||||||
@@ -60,6 +66,7 @@ try {
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log("%cLet's set up your new Fresh project.\n", "font-weight: bold");
|
||||||
|
|
||||||
const useTwind = flags.twind === null
|
const useTwind = flags.twind === null
|
||||||
? confirm(USE_TWIND_MESSAGE)
|
? confirm(USE_TWIND_MESSAGE)
|
||||||
@@ -335,7 +342,28 @@ await generate(resolvedDirectory, manifest);
|
|||||||
|
|
||||||
// Specifically print unresolvedDirectory, rather than resolvedDirectory in order to
|
// Specifically print unresolvedDirectory, rather than resolvedDirectory in order to
|
||||||
// not leak personal info (e.g. `/Users/MyName`)
|
// not leak personal info (e.g. `/Users/MyName`)
|
||||||
console.log("\n%cProject created!", "color: green; font-weight: bold");
|
console.log("\n%cProject initialized!\n", "color: green; font-weight: bold");
|
||||||
console.log(`\nIn order to start the development server, run:\n`);
|
|
||||||
console.log(`$ cd ${unresolvedDirectory}`);
|
console.log(
|
||||||
console.log("$ deno task start");
|
`Enter your project directory using %ccd ${unresolvedDirectory}%c.`,
|
||||||
|
"color: cyan",
|
||||||
|
"",
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
"Run %cdeno task start%c to start the project. %cCTRL-C%c to stop.",
|
||||||
|
"color: cyan",
|
||||||
|
"",
|
||||||
|
"color: cyan",
|
||||||
|
"",
|
||||||
|
);
|
||||||
|
console.log();
|
||||||
|
console.log(
|
||||||
|
"Stuck? Join our Discord %chttps://discord.gg/deno",
|
||||||
|
"color: cyan",
|
||||||
|
"",
|
||||||
|
);
|
||||||
|
console.log();
|
||||||
|
console.log(
|
||||||
|
"%cHappy hacking! 🦕",
|
||||||
|
"color: gray",
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user