Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2021-07-30 09:28:51 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-10-05 19:52:11 +0300
commit666fe596bf4629777f995dd79046b1db632ffdfb (patch)
tree9e14fcf9c5d325e668d75d2b313242e16e7fbec3 /build
parent2b4d0d166b58cabfb0384a2081d84e51df84e37f (diff)
Enable `unicorn/no-array-for-each` rule
Diffstat (limited to 'build')
-rw-r--r--build/generate-sri.js4
-rw-r--r--build/zip-examples.js16
2 files changed, 10 insertions, 10 deletions
diff --git a/build/generate-sri.js b/build/generate-sri.js
index 221873b8fe..47d02c4c3c 100644
--- a/build/generate-sri.js
+++ b/build/generate-sri.js
@@ -47,7 +47,7 @@ const files = [
}
]
-files.forEach(file => {
+for (const file of files) {
fs.readFile(file.file, 'utf8', (err, data) => {
if (err) {
throw err
@@ -61,4 +61,4 @@ files.forEach(file => {
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
})
-})
+}
diff --git a/build/zip-examples.js b/build/zip-examples.js
index 312548e8af..6c8ae527ac 100644
--- a/build/zip-examples.js
+++ b/build/zip-examples.js
@@ -57,22 +57,22 @@ sh.mkdir('-p', [
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
-cssFiles.forEach(file => {
+for (const file of cssFiles) {
sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
-})
+}
-jsFiles.forEach(file => {
+for (const file of jsFiles) {
sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
-})
+}
-imgFiles.forEach(file => {
+for (const file of imgFiles) {
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
-})
+}
sh.rm(`${distFolder}/index.html`)
// get all examples' HTML files
-sh.find(`${distFolder}/**/*.html`).forEach(file => {
+for (const file of sh.find(`${distFolder}/**/*.html`)) {
const fileContents = sh.cat(file)
.toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
@@ -81,7 +81,7 @@ sh.find(`${distFolder}/**/*.html`).forEach(file => {
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
new sh.ShellString(fileContents).to(file)
-})
+}
// create the zip file
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)