Initial commit
This commit is contained in:
commit
7878e653a0
253 changed files with 24552 additions and 0 deletions
17
scripts/chrome.js
Normal file
17
scripts/chrome.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
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"');
|
6
scripts/copy-env.js
Normal file
6
scripts/copy-env.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
const execSync = require('child_process').execSync;
|
||||
|
||||
const fileName = process.argv[process.argv.length - 1];
|
||||
|
||||
execSync(`cp ${ fileName }.example ${ fileName }`);
|
||||
|
15
scripts/electron.js
Normal file
15
scripts/electron.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const fs = require('fs');
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
const workingDir = process.cwd();
|
||||
const buildDir = `${ workingDir }/build`;
|
||||
|
||||
const removeFiles = ['service-worker.js', 'robots.txt', 'manifest.json'];
|
||||
|
||||
removeFiles.forEach(
|
||||
file => fs.unlinkSync(`${ buildDir }/${ file }`)
|
||||
);
|
||||
|
||||
execSync('cp -r public-electron/. build');
|
||||
execSync('cd build && yarn');
|
||||
|
9
scripts/sentry.js
Normal file
9
scripts/sentry.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
const execSync = require('child_process').execSync;
|
||||
const version = require('../package.json').version;
|
||||
|
||||
execSync(`./node_modules/.bin/env-cmd -f ./.env.prod.sentry react-scripts build`, { stdio: 'inherit' });
|
||||
execSync(`./node_modules/.bin/env-cmd -f ./.env.prod.sentry sentry-cli releases new websocket-king-${version}`, { stdio: 'inherit' });
|
||||
execSync(`./node_modules/.bin/env-cmd -f ./.env.prod.sentry sentry-cli releases files websocket-king-${version} upload-sourcemaps --ext js --ext map ./build`, { stdio: 'inherit' });
|
||||
execSync(`./node_modules/.bin/env-cmd -f ./.env.prod.sentry sentry-cli releases finalize websocket-king-${version}`, { stdio: 'inherit' });
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue