1
0
mirror of synced 2025-12-19 18:11:23 -05:00
Files
blitz/.github/checkInstallTime.js
Justin Hall b3814fc7c0 Standardize prettier options across all Blitz code bases (#703)
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-06-19 09:33:57 +07:00

19 lines
516 B
JavaScript
Executable File

#!/usr/bin/env node
const fs = require("fs")
const yarnOut = fs.readFileSync(0, {encoding: "utf8"})
const [installTimeString] = /(?<=^Done in )\d+\.\d+(?=s\.$)/m.exec(yarnOut)
const installTime = Number(installTimeString)
console.log(`Install time: ${installTime}s`)
if (installTime < 30) {
console.log("We're below 30 secs. That's awesome!")
} else if (installTime < 50) {
console.log("We're below 50 secs. That's fine!")
} else {
console.log("We're above 50 secs. That's not great!")
process.exit(1)
}