Skip to content

Commit 66c4a3f

Browse files
authored
Merge pull request #24 from GetScatter/master
build script
2 parents b560ed7 + 84708fa commit 66c4a3f

11 files changed

Lines changed: 26 additions & 7 deletions

File tree

dist/main.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/static/icon.png

-549 KB
Loading

dist/static/icons/icon-64.png

-3.77 KB
Loading

dist/static/icons/icon-tray.png

-3.06 KB
Loading

dist/static/icons/icon.icns

36.4 KB
Binary file not shown.

dist/static/icons/icon.ico

-117 KB
Binary file not shown.

dist/static/icons/icon.jpg

7.67 KB
Loading

dist/static/icons/icon.png

-549 KB
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"url": "https://get-scatter.com/"
1010
},
1111
"scripts": {
12-
"build": "webpack -p --mode=production --progress --config build/webpack.config.prod.js",
12+
"build": "node scripts/release",
13+
"build:force": "webpack -p --mode=production --progress --config build/webpack.config.prod.js",
1314
"watch": "webpack -p --mode=production --progress --config build/webpack.config.dev.js --watch",
1415
"server": "http-server ./dist -p 8081 -d -i -g -P --cors='*' -c-1",
1516
"prod": "concurrently \"npm run watch\" \"npm run server\"",

scripts/release.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
require('dotenv').config();
2+
const childProcess = require('child_process');
3+
4+
const quit = msg => {
5+
console.error(msg);
6+
process.exit(0);
7+
};
8+
9+
if(process.env.NO_WALLET) return quit('NO_WALLET is enabled');
10+
11+
const run = (cmd, callback = () => {}) => {
12+
console.log('running: ', cmd)
13+
14+
const p = childProcess.exec(cmd);
15+
p.stdout.on('data', ( data ) => console.log(data));
16+
p.stderr.on('data', ( data ) => console.log(data));
17+
p.on('error', function (err) { console.error(err); });
18+
p.on('exit', function (code) { console.log('exited', code); callback(); });
19+
}
20+
21+
run(`yarn install`, () => {
22+
run(`webpack -p --mode=production --progress --config build/webpack.config.prod.js`);
23+
})

0 commit comments

Comments
 (0)