diff options
author | codecalm <codecalm@gmail.com> | 2021-01-20 22:32:36 +0100 |
---|---|---|
committer | codecalm <codecalm@gmail.com> | 2021-01-20 22:32:36 +0100 |
commit | 87982f9917024d1db40d0d266a5f19c7aa7c5b64 (patch) | |
tree | 59d2faf5cdfd31c580eaea80b741e057615904bd /gulpfile.js | |
parent | import cleanup (diff) | |
download | tabler-icons-87982f9917024d1db40d0d266a5f19c7aa7c5b64.tar.xz |
build process improvement
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gulpfile.js b/gulpfile.js index 86fc12be..e69c9e1d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -230,8 +230,8 @@ gulp.task('iconfont-svg-outline', function (cb) { }).catch(error => console.log(error)); }); - // correct svg outline directions in a child process using fontforge - const generate = cp.spawn("fontforge", ["-lang=py", "-script", "generate.py"], { stdio: 'inherit' }); + // correct svg outline directions in a child process using fontforge + const generate = cp.spawn("fontforge", ["-lang=py", "-script", ".build/generate.py"], { stdio: 'inherit' }); generate.on("close", function (code) { console.log(`Correcting svg outline directions exited with code ${code}`); if (!code) { @@ -314,7 +314,25 @@ gulp.task('iconfont-css', function (cb) { }); }); -gulp.task('build-iconfont', gulp.series('iconfont-prepare', 'iconfont-svg-outline', 'iconfont', 'iconfont-css', 'iconfont-clean')); +gulp.task('update-tags-unicode', function(cb) { + let tags = require('./tags.json'), + unicodes = require('./iconfont-unicode.json'); + + for(let i in tags) { + tags[i] = { + ...tags[i], + unicode: unicodes[i], + } + } + + console.log('tags', tags); + + fs.writeFileSync(`tags.json`, JSON.stringify(tags, null, 2)); + + cb(); +}); + +gulp.task('build-iconfont', gulp.series('iconfont-prepare', 'iconfont-svg-outline', 'iconfont', 'iconfont-css', 'iconfont-clean', 'update-tags-unicode')); gulp.task('build-zip', function () { const version = p.version; |