const styles = require('../app/styles'); async function start(){ let style = null; try { style = await styles.render("main"); } catch (err) { console.log(err); } if (style !== null){ console.log(style); let e = document.createElement('style'); e.innerHTML = style.css.toString(); let head = document.getElementsByTagName('head'); if (head.length > 0) head = head[0]; // There should really only be one head... we're not a hydra!!! head.appendChild(e); } } console.log("Kicking the pig!"); start(); /* sass.render({file: 'view/sass/main.scss'}, (err, res) => { if (err){ console.log(err); return; } console.log(res.css.toString()); let style = document.createElement('style'); style.innerHTML = res.css.toString(); let head = document.getElementsByTagName('head'); if (head.length > 0) head = head[0]; // There should really only be one head... we're not a hydra!!! head.appendChild(style); }); */