Skip to content

Commit

Permalink
chore: fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 23, 2022
1 parent 907d432 commit 30e4d32
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/utils/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function generateFSTree(dir: string) {
let totalNodeModulesSize = 0;
let totalNodeModulesGzip = 0;

let treeText = ''
let treeText = "";

for (const [index, item] of items.entries()) {
let dir = dirname(item.file);
Expand All @@ -49,22 +49,18 @@ export async function generateFSTree(dir: string) {
continue;
}

treeText += (
chalk.gray(
` ${treeChar} ${rpath} (${prettyBytes(item.size)}) (${prettyBytes(
item.gzip
)} gzip)\n`
)
treeText += chalk.gray(
` ${treeChar} ${rpath} (${prettyBytes(item.size)}) (${prettyBytes(
item.gzip
)} gzip)\n`
);
totalSize += item.size;
totalGzip += item.gzip;
}

treeText += (
`${chalk.cyan("Σ Total size:")} ${prettyBytes(
totalSize + totalNodeModulesSize
)} (${prettyBytes(totalGzip + totalNodeModulesGzip)} gzip)\n`
);
treeText += `${chalk.cyan("Σ Total size:")} ${prettyBytes(
totalSize + totalNodeModulesSize
)} (${prettyBytes(totalGzip + totalNodeModulesGzip)} gzip)\n`;

return treeText;
}

0 comments on commit 30e4d32

Please sign in to comment.