Added fs-extra for creation of a dist and deploy procedure

This commit is contained in:
Alan Velasco
2019-06-25 19:55:51 -07:00
parent feee6da8b1
commit 5ecf25d10e
4 changed files with 28 additions and 5 deletions

View File

@ -4,7 +4,7 @@
https://github.com/twitter/twemoji/blob/gh-pages/LICENSE
*/
const fs = require('fs');
const fs = require('fs-extra');
const path = require('path');
const { spawnSync } = require('child_process');
@ -56,5 +56,5 @@ fs.writeFileSync(distFile('twemoji.min.js'), `${copyright}\n${minifiedContents}`
fs.writeFileSync(distFile('twemoji.esm.js'), `${copyright}\n${minifiedContents}\nexport default twemoji;`);
// Copy the png assets and svgs to the dist folder
fs.copyFileSync(file('assets/svg'), distFile('svg'));
fs.copyFileSync(file('assets/72x72'), distFile('72x72'));
fs.copySync(file('assets/svg'), distFile('svg'));
fs.copySync(file('assets/72x72'), distFile('72x72'));