forked from dustinblackman/Championify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
85 lines (74 loc) · 1.51 KB
/
gulpfile.coffee
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
gulp = require 'gulp'
requireDir = require 'require-dir'
runSequence = require 'run-sequence'
_ = require 'lodash'
requireDir('./tasks')
pkg = require './package.json'
# Setup some globals
GLOBAL.releaseFile = _.template('./releases/' + pkg.release_file_template)
GLOBAL.ifRelease = (process.argv.indexOf('release') > -1)
gulp.task 'setup', ->
runSequence('bower', 'preen')
# Main Tasks
gulp.task 'main', (cb) ->
runSequence(
'delete-dev'
'mkdir:app'
['electron:packagejson'
'electron:settings'
'bower_copy'
'coffee'
'stylus']
cb
)
gulp.task 'dev', ->
runSequence(
'main'
'copy:data'
'dev_folder'
'run-watch')
gulp.task 'package-asar', (cb) ->
runSequence(
'main'
'electron:deps'
['copy:app'
'copy:data'
'copy:views'
'copy:translations']
'removelivereload'
'asar'
cb
)
# Build is meant for building on Mac.
gulp.task 'build', (cb) ->
if process.platform == 'win32'
return runSequence('build:win', cb)
else
return runSequence('build:osx', cb)
gulp.task 'build:osx', (cb) ->
runSequence(
'package-asar'
'compile:osx'
'move:compiled-mac:folder'
cb
)
gulp.task 'build:win', (cb) ->
runSequence(
'package-asar'
'compile:win'
'move:compiled-win:folder'
cb
)
gulp.task 'release', ->
runSequence(
'test'
'delete-releases'
'create-releases-folder'
'package-asar'
'compile:all'
'zip:all'
'tarball:all'
'move:asar:update'
'virustotal'
'github-release'
)