-
Notifications
You must be signed in to change notification settings - Fork 10
/
gruntfile.js
57 lines (49 loc) · 1.16 KB
/
gruntfile.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'use strict'
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt)
let pkg = require('./package.json')
let dep_files = Object.keys(pkg.dependencies).map(function (dep) {
return 'node_modules/' + dep + '/**/*'
})
grunt.initConfig({
clean: {
dist: {
src: ['build/'],
options: {
force: true
}
}
},
copy: {
sources: {
cwd: '.',
dest: 'build/app/',
src: ['images/**/*', 'lib/**/*', 'main.js', 'package.json']
},
dependencies: {
cwd: '.',
dest: 'build/app/',
src: dep_files
}
},
electron: {
osx: {
options: {
name: 'DockerMenu-' + pkg.version + '-Mac',
dir: 'build/app',
icon: 'images/DockerMenu.icns',
'app-bundle-id': 'dockermenu',
'app-version': pkg.version,
asar: false,
overwrite: true,
out: 'build',
platform: 'darwin',
version: '0.34.1',
arch: 'x64'
}
}
}
})
grunt.registerTask('build', ['clean', 'copy', 'electron'])
grunt.registerTask('default', ['build'])
}