1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 19:31:35 +02:00

Switch to Set#has()

This commit is contained in:
XhmikosR
2020-05-02 16:56:23 +03:00
parent 2e758f64cf
commit 6d7bc54d22
5 changed files with 15 additions and 16 deletions

View File

@@ -125,17 +125,17 @@ const getConfigByPluginKey = pluginKey => {
}
}
const utilObjects = [
const utilObjects = new Set([
'Util',
'Sanitizer'
]
])
const domObjects = [
const domObjects = new Set([
'Data',
'EventHandler',
'Manipulator',
'SelectorEngine'
]
])
const build = async plugin => {
console.log(`Building ${plugin} plugin...`)
@@ -144,11 +144,11 @@ const build = async plugin => {
const pluginFilename = path.basename(bsPlugins[plugin])
let pluginPath = rootPath
if (utilObjects.includes(plugin)) {
if (utilObjects.has(plugin)) {
pluginPath = `${rootPath}/util/`
}
if (domObjects.includes(plugin)) {
if (domObjects.has(plugin)) {
pluginPath = `${rootPath}/dom/`
}