diff options
author | codecalm <codecalm@gmail.com> | 2020-03-09 22:18:31 +0100 |
---|---|---|
committer | codecalm <codecalm@gmail.com> | 2020-03-09 22:18:31 +0100 |
commit | 8767e94afd0a48b3a20f9ca1fdce874986202981 (patch) | |
tree | c53c17f1738923caf7431a716c233427bbdbf35b /gulpfile.js | |
parent | folder clean (diff) | |
download | tabler-icons-8767e94afd0a48b3a20f9ca1fdce874986202981.tar.xz |
build first version
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gulpfile.js b/gulpfile.js index ff3c20bd..3907ef11 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,8 @@ const gulp = require('gulp'), + cp = require('child_process'), glob = require("glob"), fs = require("fs"), - path = require("path"), - svg2img = require('svg2img'); + path = require("path"); gulp.task('icons-sprite', function (cb) { @@ -55,7 +55,7 @@ gulp.task('icons-stroke', function (cb) { const icon = "disabled", strokes = ['.5', '1', '1.5', '2', '2.75'], - svgFileContent = fs.readFileSync(`_site/icons/tabler-${icon}.svg`).toString(), + svgFileContent = fs.readFileSync(`_site/icons/${icon}.svg`).toString(), padding = 16, paddingOuter = 5, iconSize = 64, @@ -110,3 +110,12 @@ gulp.task('optimize', function (cb) { cb(); }); }); + +gulp.task('build', function (cb) { + cp.exec('bundle exec jekyll build', function() { + + cp.exec('rm -f ./icons/* && cp ./_site/icons/* ./icons', function() { + cb(); + }); + }) +}); |