Skip to content

Commit

Permalink
refactor: refactor help message
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed May 27, 2021
1 parent d6be728 commit 82dee62
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/commands/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ interface HelpSection {
}

export const help = (sections: HelpSection[]): void => {
sections[0].title = `Version`;
sections[0].body = ` ${PACKAGE}@${VERSION}`;
sections[sections.length - 1].body = `${
sections[sections.length - 1].body
}\n`;

// Add header
sections.unshift({
body: `\n📚 Dico CLI\n ${chalk.cyanBright(
"Read the docs:"
)} https://docs.dico.app/cli`
});
sections[1].body = `Version:\n ${PACKAGE}@${VERSION}`;
sections[sections.length - 1].body = `${
sections[sections.length - 1].body
}\n`;
};

0 comments on commit 82dee62

Please sign in to comment.