Prepare to move minification into separate module
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
6bc25dc154
commit
2606f89e95
@ -17,7 +17,7 @@
|
|||||||
<table style="width:100%;text-align:center;color:azure;font-family:sans-serif;">
|
<table style="width:100%;text-align:center;color:azure;font-family:sans-serif;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img src="https://owlboard.info/images/logo/wide_logo.svg" style="height: 100px; padding-top: 20px; margin-top: 0px">
|
<img src="https://owlboard.info/images/logo/wide_logo.svg" style="height:100px;padding-top:0px;margin-top:0px">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -35,7 +35,8 @@ async function generateConfirmationEmail(eml, uuid) {
|
|||||||
try {
|
try {
|
||||||
let htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
|
let htmlTpl = await fs.readFile('mail-templates/register.html', 'utf-8');
|
||||||
let mini = minify(((htmlTpl).replace(/>>ACCESSCODE<</g, uuid)), { // Add collapse whitespace here
|
let mini = minify(((htmlTpl).replace(/>>ACCESSCODE<</g, uuid)), { // Add collapse whitespace here
|
||||||
removeComments: true
|
removeComments: true,
|
||||||
|
collapseWhitespace: true
|
||||||
});
|
});
|
||||||
let txtTpl = fs.readFile('mail-templates/register.txt', 'utf-8');
|
let txtTpl = fs.readFile('mail-templates/register.txt', 'utf-8');
|
||||||
return msg = {
|
return msg = {
|
||||||
|
5
src/utils/minify.utils.js
Normal file
5
src/utils/minify.utils.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const htmlShrink = require('html-minifier').minify
|
||||||
|
|
||||||
|
module.exports = async function minify(input) { // Do I need to name this function?
|
||||||
|
// Minify HTML input, including inline styles.
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user