-
Notifications
You must be signed in to change notification settings - Fork 6
/
gulpfile.js
50 lines (44 loc) · 1.27 KB
/
gulpfile.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
// Copyright 2019, Oath Inc.
// Licensed under the terms of the MIT license. See LICENSE file in project root for terms.
var gulp = require("gulp"),
consolidate = require("gulp-consolidate"),
iconfont = require("gulp-iconfont"),
zip = require("gulp-zip");
gulp.task("iconfont", function() {
return gulp
.src("build/svg/*.svg")
.pipe(
iconfont({
fontName: "denali-icon-font",
formats: ["ttf", "svg", "eot", "woff"],
prependUnicode: true,
normalize: true,
fontHeight: 1000
})
)
.on("glyphs", function(glyphs, options) {
gulp
.src("build/denali-icon-font.css")
.pipe(
consolidate("underscore", {
glyphs: glyphs,
fontName: options.fontName,
fontDate: new Date().getTime()
})
)
.pipe(gulp.dest("dist"));
gulp
.src("docs/downloads/svg/*")
.pipe(zip("denali-icon-svg.zip"))
.pipe(gulp.dest("docs/downloads"));
gulp
.src("docs/downloads/png/*")
.pipe(zip("denali-icon-png.zip"))
.pipe(gulp.dest("docs/downloads"));
gulp
.src("dist/*")
.pipe(zip("denali-icon-font.zip"))
.pipe(gulp.dest("docs/downloads"));
})
.pipe(gulp.dest("dist"));
});