aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/build/generate-sri.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/build/generate-sri.js')
-rw-r--r--vendor/twbs/bootstrap/build/generate-sri.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/twbs/bootstrap/build/generate-sri.js b/vendor/twbs/bootstrap/build/generate-sri.js
index 972f8622e..f0aa7340b 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-2020 The Bootstrap Authors
- * Copyright 2017-2020 Twitter, Inc.
+ * Copyright 2017-2021 The Bootstrap Authors
+ * Copyright 2017-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -21,11 +21,11 @@ const pkg = require('../package.json')
sh.config.fatal = true
-const configFile = path.join(__dirname, '../_config.yml')
+const configFile = path.join(__dirname, '../config.yml')
// Array of objects which holds the files to generate SRI hashes for.
// `file` is the path from the root folder
-// `configPropertyName` is the _config.yml variable's name of the file
+// `configPropertyName` is the config.yml variable's name of the file
const files = [
{
file: 'dist/css/bootstrap.min.css',
@@ -40,7 +40,7 @@ const files = [
configPropertyName: 'js_bundle_hash'
},
{
- file: `site/docs/${pkg.version_short}/assets/js/vendor/jquery.slim.min.js`,
+ file: `site/static/docs/${pkg.config.version_short}/assets/js/vendor/jquery.slim.min.js`,
configPropertyName: 'jquery_hash'
},
{
@@ -61,6 +61,6 @@ files.forEach(file => {
console.log(`${file.configPropertyName}: ${integrity}`)
- sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile)
+ sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
})
})