lib/Preview.js
function generate(file, template, context, minifyResult) {
  let string = template.render(context, {
    'styles.css': templates.styles,
    'embed.js': templates.embedJs
  });
  if (minifyResult) {
    string = minify(string, {
      caseSensitive: true,
      collapseWhitespace: true,
      html5: true,
      minifyCSS: true,
      minifyJS: true,
      removeComments: true,
      removeAttributeQuotes: true
    });
  };
  writeFile(path.join(context.config.destRoot, file), string);
}
function generate(file, template, context, minifyResult) {
  let string = template.render(context, {
    'styles.css': templates.styles,
    'embed.js': templates.embedJs
  });
  if (minifyResult) {
    string = minify(string, {
      caseSensitive: true,
      collapseWhitespace: true,
      html5: true,
      minifyCSS: true,
      minifyJS: true,
      removeComments: true,
      removeAttributeQuotes: true
    });
  };
  writeFile(path.join(context.config.destRoot, file), string);
}
function generate ( file , template , context , minifyResult ) { let string = template . render ( context , { 'styles.css' : templates . styles , 'embed.js' : templates . embedJs } ) ; if ( minifyResult ) { string = minify ( string , { caseSensitive : true , collapseWhitespace : true , html5 : true , minifyCSS : true , minifyJS : true , removeComments : true , removeAttributeQuotes : true } ) ; } ; writeFile ( path . join ( context . config . destRoot , file ) , string ) ; }
Renders the given template into a file.
Renders the given template into a file .