From e789942c00ee27966b0430c46dc8bd5b3ecf0f05 Mon Sep 17 00:00:00 2001 From: Nathan Downs Date: Wed, 29 May 2019 17:08:37 -0700 Subject: [PATCH] Revert adding SRI hashes to our recommended script tags - the way we handle resources via MaxCDN cache would mean we'd break old script tags when we publish (and the local cached file is evicted) --- 2/scripts/create-dist | 12 ++++-------- 2/templates/preview.html | 2 +- README.md | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/2/scripts/create-dist b/2/scripts/create-dist index 01aa2bb5..8af5438a 100755 --- a/2/scripts/create-dist +++ b/2/scripts/create-dist @@ -51,19 +51,15 @@ fs.unlinkSync(file('twemoji.tmp.js')); fs.writeFileSync(file('twemoji.min.js'), `${copyright}\n${minifiedContents}`); fs.writeFileSync(file('twemoji.esm.js'), `${copyright}\n${minifiedContents}\nexport default twemoji;`); -const algorithm = 'sha384'; -const digest = spawnSync('openssl', ['dgst', `-${algorithm}`, '-binary', file('twemoji.min.js')]); -if (digest.status || digest.signal){ - throw new Error(digest.stderr.toString('utf8')); -} -const integrityHash = digest.stdout.toString('base64'); const { version } = require('../../package.json'); function updateScript(filename) { - const newScript = ` +