From 8767e94afd0a48b3a20f9ca1fdce874986202981 Mon Sep 17 00:00:00 2001 From: codecalm Date: Mon, 9 Mar 2020 22:18:31 +0100 Subject: build first version --- gulpfile.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'gulpfile.js') 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(); + }); + }) +}); -- cgit v1.2.1