Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
fixup cli banner
Browse files Browse the repository at this point in the history
  • Loading branch information
pierce-h committed Aug 25, 2020
1 parent 6fc8b83 commit 46d6d46
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 43 deletions.
23 changes: 2 additions & 21 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import BaseCommand from "../base-command";
import chalk from "chalk";
import { createEnv } from "yeoman-environment";
import { flags } from "@oclif/command";
import cliBanner from '../core/utils/cli-banner';

export default class New extends BaseCommand {
static description =
Expand Down Expand Up @@ -46,7 +47,7 @@ export default class New extends BaseCommand {
force: flags.force,
};

this.log(this.banner());
this.log(cliBanner());
this.log("Time to build a ShipEngine app!");

await new Promise((resolve, reject) => {
Expand All @@ -56,24 +57,4 @@ export default class New extends BaseCommand {
});
});
}

private banner() {
return chalk.blueBright(`
.;i1: .iii,
1GLtt; ,ttfGL.
:8t .,.. ;81
;8i ,, iiii. .,. ,0t
;81 ,i1i;;iiii;;i1i: ,8t
:81 .;iii1iiii1iiii. :8t
.18i .::;iii:. .:iiii,,. ,GL.
.L8f :111iii ;iii11; i0G,
.10; .,,;iii:. .:iiii::, ,GC,
:81 .;iii1iiii1iii;. :8f
;81 ,i1i;;iiii;;i1i: :0f
;8i ,. ;1ii. .,. ,0f
:8t .,,. ;8f
tGf11: ,t1fGL,
.;i1: .1ii:
`);
}
}
24 changes: 2 additions & 22 deletions src/core/start-app.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
import nodemon from "nodemon";
import path from "path";
// import { spawn } from "child_process";
import chalk from "chalk";
import cliBanner from './utils/cli-banner';

const startServerScript = path.join(__dirname, "./start-app/server.js");
// const startClientScript = path.join(__dirname, "./start-app/client.js");

function banner() {
return chalk.blueBright(`
.;i1: .iii,
1GLtt; ,ttfGL.
:8t .,.. ;81
;8i ,, iiii. .,. ,0t
;81 ,i1i;;iiii;;i1i: ,8t
:81 .;iii1iiii1iiii. :8t
.18i .::;iii:. .:iiii,,. ,GL.
.L8f :111iii ;iii11; i0G,
.10; .,,;iii:. .:iiii::, ,GC,
:81 .;iii1iiii1iii;. :8f
;81 ,i1i;;iiii;;i1i: :0f
;8i ,. ;1ii. .,. ,0f
:8t .,,. ;8f
tGf11: ,t1fGL,
.;i1: .1ii:
`);
}

export default function startApp({
cwd,
port,
Expand All @@ -37,7 +17,7 @@ export default function startApp({
process.on("SIGINT", process.exit);
process.on("SIGTERM", process.exit);

console.log(banner());
console.log(cliBanner());

// const clientServer = spawn(
// "node",
Expand Down
32 changes: 32 additions & 0 deletions src/core/utils/cli-banner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import chalk from "chalk";

const cliBanner = (): string => {
return chalk.blueBright(`
+++++ ~+
++++++ +++++~
+ ++++++++++++++
+++++++++++++++++++
+++++++++++++++++++++
++++++++++ +++++++++++
++++++ +++++++++
++++++ +++++++++
+++++++++ +++++
+++++++++ ++++++
+++++++++++ ++++++++++
++++++++++++++++++++
+++++++++++++++++++
+++++++++++++ + ++++
~+++++ ~++++++ =+++++++++ +++
++ ++++++:+++++++++++++++
+++++++++++++
=++++++ +++++++
++++++ +++++++
++++++~ +++++++
++++++ ++++++
+++++++++++++++
++++++++++++++
++++
`);
}

export default cliBanner;

0 comments on commit 46d6d46

Please sign in to comment.