Skip to content

Commit

Permalink
chore(logo): new logo design
Browse files Browse the repository at this point in the history
  • Loading branch information
trs committed Jan 21, 2018
1 parent d822101 commit ce1c526
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 112 deletions.
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 21 additions & 15 deletions logo/generate.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
/*
Send Button by Bruno Bosse from the Noun Project
https://thenounproject.com/brunobosse/collection/basics/?i=1054386
*/
const puppeteer = require('puppeteer');
const logoPath = `file://${process.cwd()}/logo/logo.html`;

const fs = require('fs');
const htmlConvert = require('html-convert');

const convert = htmlConvert();
let ws = fs.createWriteStream('logo.png');
let rs = convert('logo/logo.html', {
width: 350,
height: 76
puppeteer.launch()
.then(browser => {
return browser.newPage()
.then(page => {
return page.goto(logoPath)
.then(() => page);
})
.then(page => {
return page.setViewport({
width: 600,
height: 250,
deviceScaleFactor: 2
})
.then(() => page.screenshot({
path: 'logo.png',
omitBackground: true
}));
})
.then(() => browser.close());
});

rs.pipe(ws);
ws.on('finish', () => process.exit());
Loading

0 comments on commit ce1c526

Please sign in to comment.