Skip to content

Commit 6aeaf90

Browse files
committed
Autoinstall cloc
1 parent d69e68d commit 6aeaf90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ const sizes = packed
2323
.find((i) => i.includes('index.umd.js'))
2424
.split(' ')
2525
.filter((i) => !isNaN(parseFloat(i)))
26-
const cloc = JSON.parse(await $`npx cloc src/lib --json`).SUM.code.toString()
26+
const cloc = JSON.parse(await $`npx --yes cloc src/lib --json`).SUM.code.toString()
2727

2828
// Write stats into `/build`
29-
const shields = (label, message, color) => ({
29+
const shields = (label, message, color = 'blue') => ({
3030
schemaVersion: 1,
3131
label,
3232
message,
33-
color: color || 'blue'
33+
color
3434
})
3535
await fs.writeJson('build/_min.json', shields('minified', `${sizes[0]} kB`))
3636
await fs.writeJson('build/_gzip.json', shields('gzipped', `${sizes[1]} kB`))

0 commit comments

Comments
 (0)