diff options
Diffstat (limited to 'vendor/twbs/bootstrap/build/generate-sri.js')
-rw-r--r-- | vendor/twbs/bootstrap/build/generate-sri.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/twbs/bootstrap/build/generate-sri.js b/vendor/twbs/bootstrap/build/generate-sri.js index 221873b8f..cde818e09 100644 --- a/vendor/twbs/bootstrap/build/generate-sri.js +++ b/vendor/twbs/bootstrap/build/generate-sri.js @@ -5,8 +5,8 @@ * Remember to use the same vendor files as the CDN ones, * otherwise the hashes won't match! * - * Copyright 2017-2021 The Bootstrap Authors - * Copyright 2017-2021 Twitter, Inc. + * Copyright 2017-2022 The Bootstrap Authors + * Copyright 2017-2022 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -47,10 +47,10 @@ const files = [ } ] -files.forEach(file => { - fs.readFile(file.file, 'utf8', (err, data) => { - if (err) { - throw err +for (const file of files) { + fs.readFile(file.file, 'utf8', (error, data) => { + if (error) { + throw error } const algo = 'sha384' @@ -61,4 +61,4 @@ files.forEach(file => { sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile) }) -}) +} |