Update polyfill and load in all locations

Also simplify copying of polyfill, this change though requires node 8 or newer but this should be fine as node is only necessary to build the extension
This commit is contained in:
Daniel Tschinder
2019-04-23 14:18:35 -07:00
parent e4a8307106
commit c59857570c
6 changed files with 2558 additions and 7202 deletions

View File

@@ -23,13 +23,9 @@ gulp.task('webextension',function(cb){
!fs.existsSync('public') && fs.mkdirSync('public');
fs.mkdirSync('public/js');
}
exec('npm install',{
cwd: 'node_modules/webextension-polyfill/'
},function(){
var stream = fs.createWriteStream('public/js/browser-polyfill.min.js');
stream.on('done',cb);
fs.createReadStream('node_modules/webextension-polyfill/dist/browser-polyfill.min.js').pipe(stream);
});
fs.copyFileSync('node_modules/webextension-polyfill/dist/browser-polyfill.min.js', 'public/js/browser-polyfill.min.js');
fs.copyFileSync('node_modules/webextension-polyfill/dist/browser-polyfill.min.js.map', 'public/js/browser-polyfill.min.js.map');
});
/*