1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added personal notes.

This commit is contained in:
Ylian Saint-Hilaire 2021-03-25 13:28:33 -07:00
parent 4a83318393
commit a53b030345
11 changed files with 1635 additions and 1540 deletions

View file

@ -357,22 +357,27 @@ function startEx(argv) {
if (outname.endsWith('.handlebars') >= 0) { inFile = inFile.split('{{{pluginHandler}}}').join('"{{{pluginHandler}}}"'); }
if (outname.endsWith('.js')) { inFile = '<script>' + inFile + '</script>'; }
var minifiedOut = minify(inFile, {
collapseBooleanAttributes: true,
collapseInlineTagWhitespace: false, // This is not good.
collapseWhitespace: true,
minifyCSS: true,
minifyJS: true,
removeComments: true,
removeOptionalTags: true,
removeEmptyAttributes: true,
removeAttributeQuotes: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeTagWhitespace: true,
preserveLineBreaks: false,
useShortDoctype: true
});
var minifiedOut = null;
try {
minifiedOut = minify(inFile, {
collapseBooleanAttributes: true,
collapseInlineTagWhitespace: false, // This is not good.
collapseWhitespace: true,
minifyCSS: true,
minifyJS: true,
removeComments: true,
removeOptionalTags: true,
removeEmptyAttributes: true,
removeAttributeQuotes: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeTagWhitespace: true,
preserveLineBreaks: false,
useShortDoctype: true
});
} catch (ex) {
console.log(ex);
}
// Perform minification post-processing
if (outname.endsWith('.js')) { minifiedOut = minifiedOut.substring(8, minifiedOut.length - 9); }