nextension
Advanced tools
Comparing version 2.2.11 to 2.2.12
@@ -25,5 +25,7 @@ #!/usr/bin/env node | ||
const bannerText = 'Globally use the command like: nextension [option] or if locally npx nextension [option]'; | ||
const totalWidth = bannerText.length + 2; | ||
const maxCommandLength = totalWidth / 2 - 1; | ||
const maxDescriptionLength = totalWidth / 2 - 1; | ||
const longestCommand = Math.max(...commands.map(cmd => cmd.command.length)); | ||
const longestDescription = Math.max(...commands.map(cmd => cmd.description.length)); | ||
const totalWidth = Math.max(longestCommand + longestDescription + 3, bannerText.length + 2); | ||
const maxCommandLength = longestCommand; | ||
const maxDescriptionLength = totalWidth - maxCommandLength - 3; | ||
const horizontalLine = '+' + '-'.repeat(totalWidth) + '+'; | ||
@@ -30,0 +32,0 @@ console.log(horizontalLine); |
{ | ||
"name": "nextension", | ||
"version": "2.2.11", | ||
"version": "2.2.12", | ||
"description": "A CLI tool to build Next.js applications as Chrome extensions", | ||
@@ -5,0 +5,0 @@ "main": "dist/build.js", |
@@ -35,5 +35,7 @@ #!/usr/bin/env node | ||
const bannerText = 'Globally use the command like: nextension [option] or if locally npx nextension [option]'; | ||
const totalWidth = bannerText.length + 2; // Adding 2 for padding | ||
const maxCommandLength = totalWidth / 2 - 1; // Subtracting 1 for '|' | ||
const maxDescriptionLength = totalWidth / 2 - 1; // Subtracting 1 for '|' | ||
const longestCommand = Math.max(...commands.map(cmd => cmd.command.length)); | ||
const longestDescription = Math.max(...commands.map(cmd => cmd.description.length)); | ||
const totalWidth = Math.max(longestCommand + longestDescription + 3, bannerText.length + 2); // Adding 2 for padding | ||
const maxCommandLength = longestCommand; | ||
const maxDescriptionLength = totalWidth - maxCommandLength - 3; // Subtracting 3 for '|' | ||
const horizontalLine = '+' + '-'.repeat(totalWidth) + '+'; | ||
@@ -49,2 +51,3 @@ console.log(horizontalLine); | ||
// Create the CLI application | ||
@@ -51,0 +54,0 @@ yargs(hideBin(process.argv)) |
Sorry, the diff of this file is not supported yet
82068
1361