@xmorse/cac 6.0.4 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno/Command.ts +5 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/deno/Command.ts
CHANGED
|
@@ -150,7 +150,11 @@ class Command {
|
|
|
150
150
|
sections.push({
|
|
151
151
|
title: 'Commands',
|
|
152
152
|
body: commands.map(command => {
|
|
153
|
-
|
|
153
|
+
const descLines = command.description.split('\n').map(line => line.trim()).filter(line => line.length > 0);
|
|
154
|
+
const firstLine = descLines[0] || '';
|
|
155
|
+
const restLines = descLines.slice(1);
|
|
156
|
+
const padding = ' ' + ' '.repeat(longestCommandName.length) + ' ';
|
|
157
|
+
return [` ${padRight(command.rawName, longestCommandName.length)} ${firstLine}`, ...restLines.map(line => `${padding} ${line}`)].join('\n');
|
|
154
158
|
}).join('\n')
|
|
155
159
|
});
|
|
156
160
|
sections.push({
|
package/dist/index.js
CHANGED
|
@@ -358,7 +358,14 @@ class Command {
|
|
|
358
358
|
sections.push({
|
|
359
359
|
title: "Commands",
|
|
360
360
|
body: commands.map((command) => {
|
|
361
|
-
|
|
361
|
+
const descLines = command.description.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
362
|
+
const firstLine = descLines[0] || "";
|
|
363
|
+
const restLines = descLines.slice(1);
|
|
364
|
+
const padding = " " + " ".repeat(longestCommandName.length) + " ";
|
|
365
|
+
return [
|
|
366
|
+
` ${padRight(command.rawName, longestCommandName.length)} ${firstLine}`,
|
|
367
|
+
...restLines.map((line) => `${padding} ${line}`)
|
|
368
|
+
].join("\n");
|
|
362
369
|
}).join("\n")
|
|
363
370
|
});
|
|
364
371
|
sections.push({
|
package/dist/index.mjs
CHANGED
|
@@ -354,7 +354,14 @@ class Command {
|
|
|
354
354
|
sections.push({
|
|
355
355
|
title: "Commands",
|
|
356
356
|
body: commands.map((command) => {
|
|
357
|
-
|
|
357
|
+
const descLines = command.description.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
358
|
+
const firstLine = descLines[0] || "";
|
|
359
|
+
const restLines = descLines.slice(1);
|
|
360
|
+
const padding = " " + " ".repeat(longestCommandName.length) + " ";
|
|
361
|
+
return [
|
|
362
|
+
` ${padRight(command.rawName, longestCommandName.length)} ${firstLine}`,
|
|
363
|
+
...restLines.map((line) => `${padding} ${line}`)
|
|
364
|
+
].join("\n");
|
|
358
365
|
}).join("\n")
|
|
359
366
|
});
|
|
360
367
|
sections.push({
|