mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-26 23:54:23 +01:00
unicorn/prefer-top-level-await
This commit is contained in:
parent
9c1b83a23c
commit
76bbd3fdee
@ -112,8 +112,7 @@
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"unicorn/prefer-top-level-await": "off"
|
||||
"no-console": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -87,19 +87,12 @@ const build = async plugin => {
|
||||
console.log(`Built ${plugin.className}`)
|
||||
}
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const basename = path.basename(__filename)
|
||||
const timeLabel = `[${basename}] finished`
|
||||
const basename = path.basename(__filename)
|
||||
const timeLabel = `[${basename}] finished`
|
||||
|
||||
console.log('Building individual plugins...')
|
||||
console.time(timeLabel)
|
||||
console.log('Building individual plugins...')
|
||||
console.time(timeLabel)
|
||||
|
||||
await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin)))
|
||||
await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin)))
|
||||
|
||||
console.timeEnd(timeLabel)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
})()
|
||||
console.timeEnd(timeLabel)
|
||||
|
@ -81,33 +81,25 @@ function showUsage(args) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
async function main(args) {
|
||||
let [oldVersion, newVersion] = args
|
||||
const args = process.argv.slice(2)
|
||||
let [oldVersion, newVersion] = args
|
||||
|
||||
if (!oldVersion || !newVersion) {
|
||||
showUsage(args)
|
||||
}
|
||||
|
||||
// Strip any leading `v` from arguments because
|
||||
// otherwise we will end up with duplicate `v`s
|
||||
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => {
|
||||
return arg.startsWith('v') ? arg.slice(1) : arg
|
||||
})
|
||||
|
||||
if (oldVersion === newVersion) {
|
||||
showUsage(args)
|
||||
}
|
||||
|
||||
bumpNpmVersion(newVersion)
|
||||
|
||||
try {
|
||||
await Promise.all(
|
||||
FILES.map(file => replaceRecursively(file, oldVersion, newVersion))
|
||||
)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
if (!oldVersion || !newVersion) {
|
||||
showUsage(args)
|
||||
}
|
||||
|
||||
main(process.argv.slice(2))
|
||||
// Strip any leading `v` from arguments because
|
||||
// otherwise we will end up with duplicate `v`s
|
||||
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => {
|
||||
return arg.startsWith('v') ? arg.slice(1) : arg
|
||||
})
|
||||
|
||||
if (oldVersion === newVersion) {
|
||||
showUsage(args)
|
||||
}
|
||||
|
||||
bumpNpmVersion(newVersion)
|
||||
|
||||
await Promise.all(
|
||||
FILES.map(file => replaceRecursively(file, oldVersion, newVersion))
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user