mailgo style tag
This commit is contained in:
parent
f95fe95a07
commit
811f737c43
@ -1,5 +1,7 @@
|
|||||||
const { src, dest, series } = require("gulp");
|
const { src, dest, series } = require("gulp");
|
||||||
|
|
||||||
|
const MAILGO_STYLE_TAG = "{{MAILGO_STYLE}}";
|
||||||
|
|
||||||
const tsGulp = require("gulp-typescript");
|
const tsGulp = require("gulp-typescript");
|
||||||
const tsProject = tsGulp.createProject("tsconfig.json");
|
const tsProject = tsGulp.createProject("tsconfig.json");
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ function js() {
|
|||||||
let cssMinContent = fs.readFileSync("dist/mailgo.min.css", "utf8");
|
let cssMinContent = fs.readFileSync("dist/mailgo.min.css", "utf8");
|
||||||
return (
|
return (
|
||||||
src("src/*.ts")
|
src("src/*.ts")
|
||||||
.pipe(replace("MAILGO_STYLE", cssMinContent))
|
.pipe(replace(MAILGO_STYLE_TAG, cssMinContent))
|
||||||
.pipe(tsProject())
|
.pipe(tsProject())
|
||||||
// .pipe(babel())
|
// .pipe(babel())
|
||||||
.pipe(dest("./"))
|
.pipe(dest("./"))
|
||||||
|
@ -827,7 +827,7 @@ const mailgoStyle = (): void => {
|
|||||||
let mailgoCSS: HTMLStyleElement = createElement("style") as HTMLStyleElement;
|
let mailgoCSS: HTMLStyleElement = createElement("style") as HTMLStyleElement;
|
||||||
mailgoCSS.id = "mailgo-style";
|
mailgoCSS.id = "mailgo-style";
|
||||||
mailgoCSS.type = "text/css";
|
mailgoCSS.type = "text/css";
|
||||||
mailgoCSS.appendChild(createTextNode(`MAILGO_STYLE`));
|
mailgoCSS.appendChild(createTextNode(`{{MAILGO_STYLE}}`));
|
||||||
document.head.appendChild(mailgoCSS);
|
document.head.appendChild(mailgoCSS);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user