forked from dustinblackman/Championify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
36 lines (27 loc) · 1.24 KB
/
gulpfile.babel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import gulp from 'gulp';
import requireDir from 'require-dir';
import runSequence from 'run-sequence';
requireDir('./tasks');
GLOBAL.if_release = process.argv.indexOf('release') > -1;
gulp.task('main', function(cb) {
return runSequence('delete-dev', 'mkdir:app', ['electron:packagejson', 'electron:settings', 'babel', 'stylus'], cb);
});
gulp.task('dev', function() {
return runSequence('main', 'copy:data', 'dev_folder', 'run-watch');
});
gulp.task('package-asar', function(cb) {
return runSequence('main', 'electron:deps', ['copy:app', 'copy:data', 'copy:views', 'copy:translations', 'clean:node_modules'], 'asar', cb);
});
gulp.task('build', function(cb) {
if (process.platform === 'win32') return runSequence('build:win', cb);
return runSequence('build:osx', cb);
});
gulp.task('build:osx', function(cb) {
return runSequence('package-asar', 'compile:osx', 'move:compiled-mac:folder', cb);
});
gulp.task('build:win', function(cb) {
return runSequence('package-asar', 'compile:win', 'move:compiled-win:folder', cb);
});
gulp.task('release', function() {
return runSequence('test', 'delete-releases', 'create-releases-folder', 'package-asar', 'compile:all', 'zip:all', 'tarball:all', 'move:asar:update', 'virustotal', 'github-release');
});