Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function() {
if (!this._uncritical) {
this._uncritical = extractCss(orig, diff);
}
return this._uncritical;
};
gulp.task('inline-critical-css', () => {
var html = fs.readFileSync('dist/index.html', 'utf8');
var critical = fs.readFileSync('app/styles/app-shell.css', 'utf8');
var inlined = inline(html, critical, {minify:true});
fs.writeFile('dist/index.html', inlined.toString('utf-8'), 'utf8');
});