[READ-ONLY] Mirror of https://github.com/excaliburjs/create-excalibur. A repo bootstrapping tool to get you started making your first games!
0

Configure Feed

Select the types of activity you want to include in your feed.

printLine

Manu Hernandez (Feb 13, 2024, 12:31 AM -0400) 2dbdc385 2aeb2ec3

+12 -8
+2 -2
src/actions/install-dependencies.js
··· 1 1 import { confirm } from "@inquirer/prompts"; 2 2 import { runCommand } from "../utils.js"; 3 - import { log, warn } from "../console.js"; 3 + import { printLine, warn } from "../console.js"; 4 4 5 5 export default async function installDependencies(projectName) { 6 6 const installDependencies = await confirm({ ··· 9 9 if (installDependencies) { 10 10 const installed = runCommand(`cd ${projectName} && npm i`); 11 11 if (!installed) { 12 - log("-".repeat(55)); 12 + printLine(); 13 13 warn("Unable to install dependencies."); 14 14 } 15 15 }
+4
src/console.js
··· 28 28 export function textMagenta(text) { 29 29 return customChalk.magenta(text); 30 30 } 31 + 32 + export function printLine(symbol = "-") { 33 + log(symbol.repeat(55)); 34 + }
+2 -2
src/flows/create-new-game.js
··· 4 4 import initRepo from "../actions/initialize-repository.js"; 5 5 import cloneRepo from "../actions/clone-repo.js"; 6 6 import { printSupport, slugify } from "../utils.js"; 7 - import { log, success, textBlue, textGray } from "../console.js"; 7 + import { log, printLine, success, textBlue, textGray } from "../console.js"; 8 8 9 9 const TEMPLATES = [ 10 10 { ··· 57 57 return true; 58 58 } 59 59 function outro(projectName, startCommand) { 60 - log("-".repeat(55)); 60 + printLine(); 61 61 success("Project successfully configured."); 62 62 log( 63 63 `${textGray("Enter your directory:")} ${textBlue(`cd ./${projectName}`)}`
+2 -3
src/flows/inspect-game.js
··· 1 1 import { select } from "@inquirer/prompts"; 2 - import { log, success, textGray, textBlue } from "../console.js"; 2 + import { log, success, textGray, textBlue, printLine } from "../console.js"; 3 3 import { printSupport, slugify } from "../utils.js"; 4 4 import cloneRepo from "../actions/clone-repo.js"; 5 - import installDependencies from "../actions/install-dependencies.js"; 6 5 7 6 function byTitle(a, b) { 8 7 if (a.title < b.title) { ··· 150 149 return indexed; 151 150 } 152 151 function outro(projectName) { 153 - log("-".repeat(55)); 152 + printLine(); 154 153 success("Game successfully downloaded."); 155 154 log( 156 155 `${textGray("Enter the game directory:")} ${textBlue(
+2 -1
src/utils.js
··· 1 1 import { 2 2 alert, 3 3 log, 4 + printLine, 4 5 textBlue, 5 6 textGray, 6 7 textMagenta, ··· 21 22 log(textWhite("If you find yourself stuck:")); 22 23 printDiscord(); 23 24 printDocs(); 24 - log("-".repeat(55)); 25 + printLine(); 25 26 } 26 27 27 28 export function runCommand(command) {