mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 18:54:30 +01:00
Remove sri-toolbox dependency.
We can achieve the same very easily.
This commit is contained in:
parent
b2b933c181
commit
3fcddfa42e
@ -10,9 +10,9 @@
|
|||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const crypto = require('crypto')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const sriToolbox = require('sri-toolbox')
|
|
||||||
const sh = require('shelljs')
|
const sh = require('shelljs')
|
||||||
|
|
||||||
sh.config.fatal = true
|
sh.config.fatal = true
|
||||||
@ -47,9 +47,9 @@ files.forEach((file) => {
|
|||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
|
|
||||||
const integrity = sriToolbox.generate({
|
const algo = 'sha384'
|
||||||
algorithms: ['sha384']
|
const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64')
|
||||||
}, data)
|
const integrity = `${algo}-${hash}`
|
||||||
|
|
||||||
console.log(`${file.configPropertyName}: ${integrity}`)
|
console.log(`${file.configPropertyName}: ${integrity}`)
|
||||||
|
|
||||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -9920,12 +9920,6 @@
|
|||||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"sri-toolbox": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/sri-toolbox/-/sri-toolbox-0.2.0.tgz",
|
|
||||||
"integrity": "sha1-p/6lw/3lXmdc8cjAbz67XCk1g14=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"sshpk": {
|
"sshpk": {
|
||||||
"version": "1.14.2",
|
"version": "1.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
|
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
|
||||||
|
@ -135,7 +135,6 @@
|
|||||||
"shelljs": "^0.8.2",
|
"shelljs": "^0.8.2",
|
||||||
"shx": "^0.3.2",
|
"shx": "^0.3.2",
|
||||||
"sinon": "^6.3.5",
|
"sinon": "^6.3.5",
|
||||||
"sri-toolbox": "^0.2.0",
|
|
||||||
"stylelint": "^9.6.0",
|
"stylelint": "^9.6.0",
|
||||||
"stylelint-config-recommended-scss": "^3.2.0",
|
"stylelint-config-recommended-scss": "^3.2.0",
|
||||||
"stylelint-config-standard": "^18.2.0",
|
"stylelint-config-standard": "^18.2.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user