mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-16 08:25:14 +02:00
Merge pull request #45 from Kaelio/luca/klo-654-improve-indents
feat(cli): add box-drawing prefixes to setup messages
This commit is contained in:
commit
fcdf5234c6
14 changed files with 81 additions and 47 deletions
|
|
@ -143,7 +143,7 @@ async function loadExistingProject(projectDir: string, deps: KtxSetupProjectDeps
|
|||
}
|
||||
|
||||
function printProjectSummary(io: KtxCliIo, projectDir: string): void {
|
||||
io.stdout.write(`Project: ${projectDir}\n`);
|
||||
io.stdout.write(`│ Project: ${projectDir}\n`);
|
||||
}
|
||||
|
||||
async function promptForNewProjectDir(
|
||||
|
|
@ -155,8 +155,8 @@ async function promptForNewProjectDir(
|
|||
const defaultProjectDir = join(projectDir, DEFAULT_NEW_PROJECT_FOLDER_NAME);
|
||||
|
||||
while (true) {
|
||||
io.stdout.write(`Relative paths are resolved from:\n ${projectDir}\n`);
|
||||
io.stdout.write(`Home paths are resolved from:\n ${homeDir}\n`);
|
||||
io.stdout.write(`│ Relative paths are resolved from:\n│ ${projectDir}\n`);
|
||||
io.stdout.write(`│ Home paths are resolved from:\n│ ${homeDir}\n`);
|
||||
const destinationChoice = await prompts.select({
|
||||
message: 'Where should KTX create the project?',
|
||||
options: [
|
||||
|
|
@ -220,7 +220,7 @@ async function promptForNewProjectDir(
|
|||
confirmedCreation = true;
|
||||
}
|
||||
|
||||
io.stdout.write(`KTX will create:\n ${selectedDir}\n`);
|
||||
io.stdout.write(`│ KTX will create:\n│ ${selectedDir}\n`);
|
||||
if (state !== 'non-empty-directory') {
|
||||
const createAction = await prompts.select({
|
||||
message: `Create KTX project at ${selectedDir}?`,
|
||||
|
|
@ -324,7 +324,7 @@ export async function runKtxSetupProjectStep(
|
|||
|
||||
const prompts = deps.prompts ?? createClackSetupProjectPromptAdapter();
|
||||
io.stdout.write(
|
||||
'Use Up/Down to move, Enter to confirm the current selection, choose Back to return to the previous step, Ctrl+C to exit.\n',
|
||||
'│ Use Up/Down to move, Enter to confirm the current selection, choose Back to return to the previous step, Ctrl+C to exit.\n',
|
||||
);
|
||||
while (true) {
|
||||
const choice = await prompts.select({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue