Skip to content

Commit

Permalink
Update script to account for upcoming font-family generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jun 23, 2020
1 parent b30306d commit 3cfd47a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build/build-svgs.js
Expand Up @@ -57,6 +57,17 @@ const processFile = (file, config) => new Promise((resolve, reject) => {
$(svg).attr('width', `${svgWidth}em`)
$(svg).attr('height', `${svgHeight}em`)

// Todo: Pass argument to script to flip between ems and pixels.
// Until then, leaving code here—font-family generation requires
// use of pixels.

// const svgWidth = dimensions[2]
// const svgHeight = dimensions[3]

// $(svg).attr('width', `${svgWidth}`)
// $(svg).attr('height', `${svgHeight}`)


$(svg).attr('class', `bi bi-${path.basename(file, '.svg')}`)

fs.writeFile(file, $(svg), 'utf8')
Expand Down

0 comments on commit 3cfd47a

Please sign in to comment.