-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.js
249 lines (243 loc) · 11.6 KB
/
build.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
const a = [
['glyph/add', 'svg/phone-missed.svg'],
['glyph/arrow-left', 'svg/phone-missed.svg'],
['glyph/arrow-right', 'svg/phone-missed.svg'],
['glyph/audio', 'svg/phone-missed.svg'],
['glyph/check', 'svg/phone-missed.svg'],
['glyph/check-circle', 'svg/phone-missed.svg'],
['glyph/checkbox', 'svg/phone-missed.svg'],
['glyph/chevron-down', 'svg/chevron-down.svg'],
['glyph/chevron-left-circle', 'svg/phone-missed.svg'],
['glyph/chevron-left-large', 'svg/phone-missed.svg'],
['glyph/chevron-right-circle', 'svg/phone-missed.svg'],
['glyph/chevron-right-large', 'svg/phone-missed.svg'],
['glyph/chevron-up', 'svg/phone-missed.svg'],
['glyph/comment', 'svg/phone-missed.svg'],
['glyph/cross', 'svg/phone-missed.svg'],
['glyph/cross-circle', 'svg/phone-missed.svg'],
['glyph/document', 'svg/phone-missed.svg'],
['glyph/document-filled', 'svg/phone-missed.svg'],
['glyph/download', 'svg/phone-missed.svg'],
['glyph/dropbox', 'svg/phone-missed.svg'],
['glyph/editor/add', 'svg/plus.svg'],
['glyph/editor/align-center', 'svg/phone-missed.svg'],
['glyph/editor/align-image-center', 'svg/phone-missed.svg'],
['glyph/editor/align-image-left', 'svg/phone-missed.svg'],
['glyph/editor/align-image-right', 'svg/phone-missed.svg'],
['glyph/editor/align-left', 'svg/phone-missed.svg'],
['glyph/editor/align-right', 'svg/phone-missed.svg'],
['glyph/editor/attachment', 'svg/phone-missed.svg'],
['glyph/editor/bold', 'svg/bold.svg'],
['glyph/editor/bullet-list', 'svg/list.svg'],
['glyph/editor/close', 'svg/phone-missed.svg'],
['glyph/editor/code', 'svg/code.svg'],
['glyph/editor/collapse', 'svg/phone-missed.svg'],
['glyph/editor/date', 'svg/phone-missed.svg'],
['glyph/editor/decision', 'svg/git-branch.svg'],
['glyph/editor/done', 'svg/phone-missed.svg'],
['glyph/editor/edit', 'svg/edit.svg'],
['glyph/editor/emoji', 'svg/smile.svg'],
['glyph/editor/error', 'svg/phone-missed.svg'],
['glyph/editor/expand', 'svg/maximize-2.svg'],
['glyph/editor/file', 'svg/phone-missed.svg'],
['glyph/editor/hint', 'svg/phone-missed.svg'],
['glyph/editor/horizontal-rule', 'svg/phone-missed.svg'],
['glyph/editor/image', 'svg/phone-missed.svg'],
['glyph/editor/info', 'svg/phone-missed.svg'],
['glyph/editor/italic', 'svg/italic.svg'],
['glyph/editor/layout-three-equal', 'svg/phone-missed.svg'],
['glyph/editor/layout-two-equal', 'svg/layout.svg'],
['glyph/editor/layout-two-left-sidebar', 'svg/phone-missed.svg'],
['glyph/editor/layout-two-right-sidebar', 'svg/phone-missed.svg'],
['glyph/editor/link', 'svg/link.svg'],
['glyph/editor/media-center', 'svg/phone-missed.svg'],
['glyph/editor/media-full-width', 'svg/phone-missed.svg'],
['glyph/editor/media-wide', 'svg/phone-missed.svg'],
['glyph/editor/media-wrap-left', 'svg/phone-missed.svg'],
['glyph/editor/media-wrap-right', 'svg/phone-missed.svg'],
['glyph/editor/mention', 'svg/at-sign.svg'],
['glyph/editor/more', 'svg/more-horizontal.svg'],
['glyph/editor/note', 'svg/phone-missed.svg'],
['glyph/editor/number-list', 'svg/list.svg'],
['glyph/editor/open', 'svg/phone-missed.svg'],
['glyph/editor/remove', 'svg/trash.svg'],
['glyph/editor/search', 'svg/phone-missed.svg'],
['glyph/editor/success', 'svg/phone-missed.svg'],
['glyph/editor/table', 'svg/columns.svg'],
['glyph/editor/task', 'svg/check-square.svg'],
['glyph/editor/text-color', 'svg/square.svg'],
['glyph/editor/text-style', 'svg/phone-missed.svg'],
['glyph/editor/unlink', 'svg/phone-missed.svg'],
['glyph/editor/warning', 'svg/phone-missed.svg'],
['glyph/email', 'svg/phone-missed.svg'],
['glyph/emoji/activity', 'svg/phone-missed.svg'],
['glyph/emoji/custom', 'svg/phone-missed.svg'],
['glyph/emoji/flags', 'svg/phone-missed.svg'],
['glyph/emoji/food', 'svg/phone-missed.svg'],
['glyph/emoji/frequent', 'svg/phone-missed.svg'],
['glyph/emoji/nature', 'svg/phone-missed.svg'],
['glyph/emoji/objects', 'svg/phone-missed.svg'],
['glyph/emoji/people', 'svg/phone-missed.svg'],
['glyph/emoji/productivity', 'svg/phone-missed.svg'],
['glyph/emoji/symbols', 'svg/phone-missed.svg'],
['glyph/emoji/travel', 'svg/phone-missed.svg'],
['glyph/error', 'svg/phone-missed.svg'],
['glyph/file', 'svg/phone-missed.svg'],
['glyph/folder-filled', 'svg/phone-missed.svg'],
['glyph/googledrive', 'svg/phone-missed.svg'],
['glyph/hipchat/chevron-down', 'svg/phone-missed.svg'],
['glyph/hipchat/outgoing-sound', 'svg/phone-missed.svg'],
['glyph/image', 'svg/phone-missed.svg'],
['glyph/link', 'svg/link.svg'],
['glyph/location', 'svg/phone-missed.svg'],
['glyph/lock-circle', 'svg/phone-missed.svg'],
['glyph/lock-filled', 'svg/phone-missed.svg'],
['glyph/media-services/annotate', 'svg/phone-missed.svg'],
['glyph/media-services/arrow', 'svg/phone-missed.svg'],
['glyph/media-services/audio', 'svg/phone-missed.svg'],
['glyph/media-services/blur', 'svg/phone-missed.svg'],
['glyph/media-services/brush', 'svg/phone-missed.svg'],
['glyph/media-services/document', 'svg/phone-missed.svg'],
['glyph/media-services/image', 'svg/phone-missed.svg'],
['glyph/media-services/line', 'svg/phone-missed.svg'],
['glyph/media-services/oval', 'svg/phone-missed.svg'],
['glyph/media-services/pdf', 'svg/phone-missed.svg'],
['glyph/media-services/presentation', 'svg/phone-missed.svg'],
['glyph/media-services/rectangle', 'svg/phone-missed.svg'],
['glyph/media-services/spreadsheet', 'svg/phone-missed.svg'],
['glyph/media-services/text', 'svg/phone-missed.svg'],
['glyph/media-services/unknown', 'svg/phone-missed.svg'],
['glyph/media-services/video', 'svg/phone-missed.svg'],
['glyph/media-services/zip', 'svg/phone-missed.svg'],
['glyph/media-services/zoom-in', 'svg/phone-missed.svg'],
['glyph/media-services/zoom-out', 'svg/phone-missed.svg'],
['glyph/mention', 'svg/at-sign.svg'],
['glyph/more', 'svg/phone-missed.svg'],
['glyph/office-building', 'svg/phone-missed.svg'],
['glyph/open', 'svg/phone-missed.svg'],
['glyph/page', 'svg/phone-missed.svg'],
['glyph/people-group', 'svg/phone-missed.svg'],
['glyph/question', 'svg/phone-missed.svg'],
['glyph/quote', 'svg/chevrons-right.svg'],
['glyph/radio', 'svg/phone-missed.svg'],
['glyph/recent', 'svg/phone-missed.svg'],
['glyph/refresh', 'svg/phone-missed.svg'],
['glyph/search', 'svg/phone-missed.svg'],
['glyph/select-clear', 'svg/phone-missed.svg'],
['glyph/settings', 'svg/phone-missed.svg'],
['glyph/status', 'svg/phone-missed.svg'],
['glyph/trash', 'svg/trash.svg'],
['glyph/upload', 'svg/phone-missed.svg'],
['glyph/vid-full-screen-off', 'svg/phone-missed.svg'],
['glyph/vid-full-screen-on', 'svg/phone-missed.svg'],
['glyph/vid-hd-circle', 'svg/phone-missed.svg'],
['glyph/vid-pause', 'svg/phone-missed.svg'],
['glyph/vid-play', 'svg/phone-missed.svg'],
['glyph/warning', 'svg/phone-missed.svg'],
// And the icon-file-type and icon-object icons
['glyph/archive/16', 'svg/phone-missed.svg'],
['glyph/archive/16', 'svg/phone-missed.svg'],
['glyph/audio/16', 'svg/phone-missed.svg'],
['glyph/audio/16', 'svg/phone-missed.svg'],
['glyph/document/16', 'svg/phone-missed.svg'],
['glyph/document/16', 'svg/phone-missed.svg'],
['glyph/document/24', 'svg/phone-missed.svg'],
['glyph/document/24', 'svg/phone-missed.svg'],
['glyph/excel-spreadsheet/16', 'svg/phone-missed.svg'],
['glyph/excel-spreadsheet/16', 'svg/phone-missed.svg'],
['glyph/excel-spreadsheet/24', 'svg/phone-missed.svg'],
['glyph/excel-spreadsheet/24', 'svg/phone-missed.svg'],
['glyph/executable/16', 'svg/phone-missed.svg'],
['glyph/executable/16', 'svg/phone-missed.svg'],
['glyph/generic/16', 'svg/phone-missed.svg'],
['glyph/generic/16', 'svg/phone-missed.svg'],
['glyph/generic/16', 'svg/phone-missed.svg'],
['glyph/generic/16', 'svg/phone-missed.svg'],
['glyph/gif/16', 'svg/phone-missed.svg'],
['glyph/gif/16', 'svg/phone-missed.svg'],
['glyph/google-doc/16', 'svg/phone-missed.svg'],
['glyph/google-doc/16', 'svg/phone-missed.svg'],
['glyph/google-form/16', 'svg/phone-missed.svg'],
['glyph/google-form/16', 'svg/phone-missed.svg'],
['glyph/google-sheet/16', 'svg/phone-missed.svg'],
['glyph/google-sheet/16', 'svg/phone-missed.svg'],
['glyph/google-sheet/24', 'svg/phone-missed.svg'],
['glyph/google-sheet/24', 'svg/phone-missed.svg'],
['glyph/google-sheet/24', 'svg/phone-missed.svg'],
['glyph/google-sheet/24', 'svg/phone-missed.svg'],
['glyph/google-slide/16', 'svg/phone-missed.svg'],
['glyph/google-slide/16', 'svg/phone-missed.svg'],
['glyph/google-slide/24', 'svg/phone-missed.svg'],
['glyph/google-slide/24', 'svg/phone-missed.svg'],
['glyph/image/16', 'svg/phone-missed.svg'],
['glyph/image/16', 'svg/phone-missed.svg'],
['glyph/pdf-document/16', 'svg/phone-missed.svg'],
['glyph/pdf-document/16', 'svg/phone-missed.svg'],
['glyph/powerpoint-presentation/16', 'svg/phone-missed.svg'],
['glyph/powerpoint-presentation/16', 'svg/phone-missed.svg'],
['glyph/powerpoint-presentation/24', 'svg/phone-missed.svg'],
['glyph/powerpoint-presentation/24', 'svg/phone-missed.svg'],
['glyph/presentation/16', 'svg/phone-missed.svg'],
['glyph/presentation/16', 'svg/phone-missed.svg'],
['glyph/presentation/24', 'svg/phone-missed.svg'],
['glyph/presentation/24', 'svg/phone-missed.svg'],
['glyph/sketch/16', 'svg/phone-missed.svg'],
['glyph/sketch/16', 'svg/phone-missed.svg'],
['glyph/source-code/16', 'svg/phone-missed.svg'],
['glyph/source-code/16', 'svg/phone-missed.svg'],
['glyph/spreadsheet/16', 'svg/phone-missed.svg'],
['glyph/spreadsheet/16', 'svg/phone-missed.svg'],
['glyph/spreadsheet/24', 'svg/phone-missed.svg'],
['glyph/spreadsheet/24', 'svg/phone-missed.svg'],
['glyph/video/16', 'svg/phone-missed.svg'],
['glyph/video/16', 'svg/phone-missed.svg'],
['glyph/word-document/16', 'svg/phone-missed.svg'],
['glyph/word-document/16', 'svg/phone-missed.svg'],
['glyph/word-document/24', 'svg/phone-missed.svg'],
['glyph/word-document/24', 'svg/phone-missed.svg'],
['glyph/blog/16', 'svg/phone-missed.svg'],
['glyph/blog/16', 'svg/phone-missed.svg'],
['glyph/branch/16', 'svg/phone-missed.svg'],
['glyph/branch/16', 'svg/phone-missed.svg'],
['glyph/bug/16', 'svg/phone-missed.svg'],
['glyph/bug/16', 'svg/phone-missed.svg'],
['glyph/changes/16', 'svg/phone-missed.svg'],
['glyph/changes/16', 'svg/phone-missed.svg'],
['glyph/epic/16', 'svg/phone-missed.svg'],
['glyph/epic/16', 'svg/phone-missed.svg'],
['glyph/incident/16', 'svg/phone-missed.svg'],
['glyph/incident/16', 'svg/phone-missed.svg'],
['glyph/issue/16', 'svg/phone-missed.svg'],
['glyph/issue/16', 'svg/phone-missed.svg'],
['glyph/page/16', 'svg/phone-missed.svg'],
['glyph/page/16', 'svg/phone-missed.svg'],
['glyph/problem/16', 'svg/phone-missed.svg'],
['glyph/problem/16', 'svg/phone-missed.svg'],
['glyph/pull-request/16', 'svg/phone-missed.svg'],
['glyph/pull-request/16', 'svg/phone-missed.svg'],
['glyph/story/16', 'svg/phone-missed.svg'],
['glyph/story/16', 'svg/phone-missed.svg'],
['glyph/subtask/16', 'svg/phone-missed.svg'],
['glyph/subtask/16', 'svg/phone-missed.svg'],
['glyph/task/16', 'svg/phone-missed.svg'],
['glyph/task/16', 'svg/phone-missed.svg'],
]
const fs = require('fs')
a.forEach(iconInfo => {
const icon = iconInfo[0]
const svg = fs.readFileSync(iconInfo[1])
const pathArray = icon.split('/')
const filename = pathArray.pop()
const dir = pathArray.join('/')
const componentName = `Icon${filename.replace(/[\W]/g, '')}`
const iconContents = `
import React from 'react'
const svg = '${svg}'
const ${componentName} = (props) => {
return (<span dangerouslySetInnerHTML={{__html: svg}}></span>)
}
export default ${componentName}
`
fs.mkdirSync(dir, { recursive: true })
fs.writeFileSync(`${icon}.jsx`, iconContents)
})