diff options
| author | Priyansh <[email protected]> | 2021-10-06 14:40:59 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-06 14:40:59 -0400 |
| commit | 52cd86f8710f8049a744b5bcb9f4a7ce19114b6e (patch) | |
| tree | 8956dbd6f94ae25d273d496e64840ed30b6d88a5 /build/zip-examples.js | |
| parent | d065706ce4b439b5c77d9a68e708212e91cc4f0b (diff) | |
| parent | c331a150cdc2834f08bcf458cdb1b104cc510b67 (diff) | |
| download | bootstrap-52cd86f8710f8049a744b5bcb9f4a7ce19114b6e.tar.xz bootstrap-52cd86f8710f8049a744b5bcb9f4a7ce19114b6e.zip | |
Merge branch 'twbs:main' into main
Diffstat (limited to 'build/zip-examples.js')
| -rw-r--r-- | build/zip-examples.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build/zip-examples.js b/build/zip-examples.js index 312548e8a..6c8ae527a 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}"`) |
