1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-15 10:05:40 +02:00

unicorn/prefer-top-level-await

This commit is contained in:
XhmikosR
2024-03-11 16:20:04 +02:00
parent 9c1b83a23c
commit 76bbd3fdee
3 changed files with 26 additions and 42 deletions

View File

@@ -112,8 +112,7 @@
"sourceType": "module" "sourceType": "module"
}, },
"rules": { "rules": {
"no-console": "off", "no-console": "off"
"unicorn/prefer-top-level-await": "off"
} }
}, },
{ {

View File

@@ -87,8 +87,6 @@ const build = async plugin => {
console.log(`Built ${plugin.className}`) console.log(`Built ${plugin.className}`)
} }
(async () => {
try {
const basename = path.basename(__filename) const basename = path.basename(__filename)
const timeLabel = `[${basename}] finished` const timeLabel = `[${basename}] finished`
@@ -98,8 +96,3 @@ const build = async plugin => {
await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin))) await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin)))
console.timeEnd(timeLabel) console.timeEnd(timeLabel)
} catch (error) {
console.error(error)
process.exit(1)
}
})()

View File

@@ -81,7 +81,7 @@ function showUsage(args) {
process.exit(1) process.exit(1)
} }
async function main(args) { const args = process.argv.slice(2)
let [oldVersion, newVersion] = args let [oldVersion, newVersion] = args
if (!oldVersion || !newVersion) { if (!oldVersion || !newVersion) {
@@ -100,14 +100,6 @@ async function main(args) {
bumpNpmVersion(newVersion) bumpNpmVersion(newVersion)
try {
await Promise.all( await Promise.all(
FILES.map(file => replaceRecursively(file, oldVersion, newVersion)) FILES.map(file => replaceRecursively(file, oldVersion, newVersion))
) )
} catch (error) {
console.error(error)
process.exit(1)
}
}
main(process.argv.slice(2))