1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-01-17 20:58:34 +01:00

gulp fixes

This commit is contained in:
codecalm 2020-03-12 14:47:47 +01:00
parent 88404df5be
commit 9c273624f5

View File

@ -11,13 +11,11 @@ const createScreenshot = async (filePath) => {
try {
filePath = path.join(__dirname, filePath);
const fileName = path.basename(filePath, path.extname(filePath));
const fileName = filePath.replace('.svg', '');
const htmlFilePath = path.join("file:", filePath);
const browser = await puppeteer.launch();
const page = await browser.newPage();
console.log('htmlFilePath', htmlFilePath);
await page.setViewport({
height: 100,
width: 100
@ -60,7 +58,7 @@ gulp.task('icons-sprite', function (cb) {
let svg = `<svg xmlns="http://www.w3.org/2000/svg"><defs>${svgContent}</defs></svg>`;
fs.writeFileSync('.github/tabler-sprite.svg', svg);
fs.writeFileSync('dist/tabler-sprite.svg', svg);
cb();
});
});