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

github.com/twbs/icons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2020-12-23 00:19:30 +0300
committerMark Otto <otto@github.com>2020-12-23 02:28:28 +0300
commitde421d41cf1e46c6918c6521418b9fa0d6a2f662 (patch)
tree0bfaa1a3bd1bbb3c64a5cee3be706f64aa5ee45f /build
parentb8056b2164a06325f23b3e8cd64ed1ea839ce395 (diff)
build-svgs.js: minor tweaks
* rename a few variables * cache variable
Diffstat (limited to 'build')
-rw-r--r--build/build-svgs.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/build/build-svgs.js b/build/build-svgs.js
index 02312c09c..2f88bf55f 100644
--- a/build/build-svgs.js
+++ b/build/build-svgs.js
@@ -44,18 +44,18 @@ const processFile = (file, config) => new Promise((resolve, reject) => {
svgo.optimize(data)
.then(result => {
const $ = cheerio.load(result.data)
- const svg = $('svg')
+ const $svg = $('svg')
- svg.replaceWith(() => $('<svg>').append($(this).html()))
+ $svg.replaceWith(() => $('<svg>').append($(this).html()))
- for (const [attr, val] of Object.entries(svgAttributes)) {
- $(svg).removeAttr(attr)
- $(svg).attr(attr, val)
+ for (const [attribute, value] of Object.entries(svgAttributes)) {
+ $svg.removeAttr(attribute)
+ $svg.attr(attribute, value)
}
- $(svg).attr('class', `bi bi-${path.basename(file, '.svg')}`)
+ $svg.attr('class', `bi bi-${path.basename(file, '.svg')}`)
- fs.writeFile(file, $(svg).toString(), 'utf8')
+ fs.writeFile(file, $svg.toString(), 'utf8')
.then(() => {
console.log(`- ${path.basename(file, '.svg')}`)
resolve()