forked from denali-design/denali-icon-font
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
67 lines (58 loc) · 1.83 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// 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"),
image = require("gulp-image");
gulp.task("iconfont", function() {
return gulp
.src("build/svg/*.svg")
.pipe(
iconfont({
fontName: "denali-icon-font",
formats: ["ttf", "svg", "eot", "woff"],
appendCodepoints: true,
appendUnicode: false,
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("build/svg/*.svg").pipe(gulp.dest("docs/downloads/svg"));
gulp
.src("build/svg/*")
.pipe(zip("denali-icon-svg.zip"))
.pipe(gulp.dest("docs/downloads"));
gulp.src("build/png/*.png").pipe(gulp.dest("docs/downloads/png"));
gulp
.src("build/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"));
// gulp.src('build/svg/*')
// .pipe(image())
// .pipe(gulp.dest('docs/downloads/png'));
// gulp.src('build/denali-icon-names.js')
// .pipe(consolidate('underscore', {
// glyphs: glyphs,
// fontName: options.fontName,
// svgCode:
// }))
// .pipe(gulp.dest('docs/js'));
})
.pipe(gulp.dest("dist"));
});