mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
Combine path and remove variable used in one place. (#24873)
This commit is contained in:
@@ -16,11 +16,10 @@ const fs = require('fs')
|
||||
const path = require('path')
|
||||
const sriToolbox = require('sri-toolbox')
|
||||
const sh = require('shelljs')
|
||||
const sed = sh.sed
|
||||
|
||||
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
|
||||
@@ -56,6 +55,6 @@ files.forEach((file) => {
|
||||
|
||||
console.log(`${file.configPropertyName}: ${integrity}`)
|
||||
|
||||
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 + '$3', configFile)
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user