-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
47 lines (42 loc) · 1.23 KB
/
Gruntfile.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
module.exports = (grunt) ->
require('load-grunt-tasks') grunt
pkg = grunt.file.readJSON('package.json')
theme = grunt.file.readJSON('theme.json')
root = 'node_modules/material-design-icons'
images = (color) ->
array = for icon, maticon of theme.icons
nonull: true
dest: "icons-#{color}/#{icon}.png",
src: "#{root}/#{maticon[0]}/#{theme.type}/" + \
"ic_#{maticon[1]}_#{color}_#{maticon[2]}dp.png"
grunt.initConfig
copy: images('white').concat images('black')
compress:
main:
options:
archive: "#{pkg.name}-v#{pkg.version}.zip"
files: [
{src: [
'icons-white/*',
'icons-black/*',
'README.md',
'LICENSE.txt',
'CHANGELOG.md',
'icons-tray.png',
'icons-app.png'
]}
]
"imagemagick-convert":
tray:
args: [
'icons-black/tray_*.png',
'+append', 'icons-tray.png'
]
app:
args: [
'icons-black/book.png',
'icons-black/tree_*.png',
'icons-black/ulist_*.png',
'+append', 'icons-app.png'
]
grunt.registerTask 'default', ['copy', 'imagemagick-convert', 'compress']