We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cloc
1 parent d69e68d commit 6aeaf90Copy full SHA for 6aeaf90
build.mjs
@@ -23,14 +23,14 @@ const sizes = packed
23
.find((i) => i.includes('index.umd.js'))
24
.split(' ')
25
.filter((i) => !isNaN(parseFloat(i)))
26
-const cloc = JSON.parse(await $`npx cloc src/lib --json`).SUM.code.toString()
+const cloc = JSON.parse(await $`npx --yes cloc src/lib --json`).SUM.code.toString()
27
28
// Write stats into `/build`
29
-const shields = (label, message, color) => ({
+const shields = (label, message, color = 'blue') => ({
30
schemaVersion: 1,
31
label,
32
message,
33
- color: color || 'blue'
+ color
34
})
35
await fs.writeJson('build/_min.json', shields('minified', `${sizes[0]} kB`))
36
await fs.writeJson('build/_gzip.json', shields('gzipped', `${sizes[1]} kB`))
0 commit comments