websocket-king/scripts/chrome.js

17 lines
431 B
JavaScript
Raw Normal View History

2021-06-16 14:09:26 +01:00
const fs = require('fs');
const execSync = require('child_process').execSync;
const workingDir = process.cwd();
const buildDir = `${ workingDir }/build`;
const removeFiles = ['robots.txt', 'manifest.json'];
removeFiles.forEach(
file => fs.unlinkSync(`${ buildDir }/${ file }`)
);
execSync('cp -r public-chrome/. build');
execSync('rm chrome-build.zip || true');
execSync('zip -vr chrome-build.zip build/* -x "*.DS_Store"');