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
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/zip-examples.js
parent2b4d0d166b58cabfb0384a2081d84e51df84e37f (diff)
Enable `unicorn/no-array-for-each` rule
Diffstat (limited to 'build/zip-examples.js')
-rw-r--r--build/zip-examples.js16
1 files changed, 8 insertions, 8 deletions
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}"`)