We can achieve the same very easily.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
+const crypto = require('crypto')
const fs = require('fs')
const path = require('path')
-const sriToolbox = require('sri-toolbox')
const sh = require('shelljs')
sh.config.fatal = true
throw err
}
- const integrity = sriToolbox.generate({
- algorithms: ['sha384']
- }, data)
+ const algo = 'sha384'
+ const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64')
+ const integrity = `${algo}-${hash}`
console.log(`${file.configPropertyName}: ${integrity}`)
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"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": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
"shelljs": "^0.8.2",
"shx": "^0.3.2",
"sinon": "^6.3.5",
- "sri-toolbox": "^0.2.0",
"stylelint": "^9.6.0",
"stylelint-config-recommended-scss": "^3.2.0",
"stylelint-config-standard": "^18.2.0",