mirror of
https://github.com/twitter/twemoji.git
synced 2024-06-15 03:35:16 +00:00
Also generate twemoji.esm.js
This commit is contained in:
parent
a2b8b5d88c
commit
68306e0278
@ -44,13 +44,13 @@ spawnSync(
|
||||
]
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
file('twemoji.min.js'),
|
||||
'/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n' +
|
||||
fs.readFileSync(file('twemoji.tmp.js'))
|
||||
);
|
||||
const copyright = '/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */';
|
||||
const minifiedContents = fs.readFileSync(file('twemoji.tmp.js'));
|
||||
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){
|
||||
|
3
2/twemoji.esm.js
Normal file
3
2/twemoji.esm.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user