1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-29 16:50:15 +02:00

build process improvement

This commit is contained in:
codecalm
2021-01-20 22:35:36 +01:00
parent 87982f9917
commit 1fe77b68fd

View File

@@ -198,8 +198,8 @@ gulp.task('iconfont-svg-outline', function (cb) {
let iconfontUnicode = {}; let iconfontUnicode = {};
if (fs.existsSync('./iconfont-unicode.json')) { if (fs.existsSync('./.build/iconfont-unicode.json')) {
iconfontUnicode = require('./iconfont-unicode'); iconfontUnicode = require('./.build/iconfont-unicode');
} }
await asyncForEach(files, async function (file) { await asyncForEach(files, async function (file) {
@@ -244,8 +244,8 @@ gulp.task('iconfont-svg-outline', function (cb) {
gulp.task('iconfont', function () { gulp.task('iconfont', function () {
let maxUnicode = 59905; let maxUnicode = 59905;
if (fs.existsSync('./iconfont-unicode.json')) { if (fs.existsSync('./.build/iconfont-unicode.json')) {
const iconfontUnicode = require('./iconfont-unicode'); const iconfontUnicode = require('./.build/iconfont-unicode');
for (const name in iconfontUnicode) { for (const name in iconfontUnicode) {
const unicode = parseInt(iconfontUnicode[name], 16); const unicode = parseInt(iconfontUnicode[name], 16);
@@ -280,7 +280,7 @@ gulp.task('iconfont', function () {
glyphsObject[glyph.name] = glyph.unicode[0].codePointAt(0).toString(16); glyphsObject[glyph.name] = glyph.unicode[0].codePointAt(0).toString(16);
}); });
fs.writeFileSync(`iconfont-unicode.json`, JSON.stringify(glyphsObject)); fs.writeFileSync(`./.build/iconfont-unicode.json`, JSON.stringify(glyphsObject));
//css //css
options['glyphs'] = glyphs; options['glyphs'] = glyphs;
@@ -316,7 +316,7 @@ gulp.task('iconfont-css', function (cb) {
gulp.task('update-tags-unicode', function(cb) { gulp.task('update-tags-unicode', function(cb) {
let tags = require('./tags.json'), let tags = require('./tags.json'),
unicodes = require('./iconfont-unicode.json'); unicodes = require('./.build/iconfont-unicode.json');
for(let i in tags) { for(let i in tags) {
tags[i] = { tags[i] = {