@ewas/esbuild-plugin-html
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -15,7 +15,7 @@ "use strict"; | ||
if (this._html.includes(HEAD_OPEN_TAG)) { | ||
this._html = this._html.replace(HEAD_OPEN_TAG, "" + HEAD_OPEN_TAG + content); | ||
this._html = this._html.replace(HEAD_OPEN_TAG, "".concat(HEAD_OPEN_TAG).concat(content)); | ||
} | ||
else { | ||
// support <head attr="xxx"> | ||
this._html = this._html.replace(/(<head\s*[\d\D]*?>)/, "$1" + content); | ||
this._html = this._html.replace(/(<head\s*[\d\D]*?>)/, "$1".concat(content)); | ||
} | ||
@@ -26,3 +26,3 @@ return this; | ||
if (content === void 0) { content = ''; } | ||
this._html = this._html.replace('</head>', content + "</head>"); | ||
this._html = this._html.replace('</head>', "".concat(content, "</head>")); | ||
return this; | ||
@@ -32,3 +32,3 @@ }; | ||
if (content === void 0) { content = ''; } | ||
this._html = this._html.replace('</body>', content + "</body>"); | ||
this._html = this._html.replace('</body>', "".concat(content, "</body>")); | ||
return this; | ||
@@ -38,3 +38,3 @@ }; | ||
if (content === void 0) { content = ''; } | ||
this._html = this._html.replace('</body>', "</body>" + content); | ||
this._html = this._html.replace('</body>', "</body>".concat(content)); | ||
return this; | ||
@@ -41,0 +41,0 @@ }; |
import { Plugin } from 'esbuild'; | ||
import { UserConfig } from '@ews/types'; | ||
import { UserConfig } from '@ewas/types'; | ||
export declare function esbuildHtmlPlugin(config: UserConfig): Plugin; |
@@ -55,6 +55,6 @@ "use strict"; | ||
} | ||
return key + "=\"" + attr[key] + "\" "; | ||
return "".concat(key, "=\"").concat(attr[key], "\" "); | ||
}) | ||
.join(''); | ||
return "<" + tag + " " + attrStr + "></" + tag + ">"; | ||
return "<".concat(tag, " ").concat(attrStr, "></").concat(tag, ">"); | ||
} | ||
@@ -61,0 +61,0 @@ function esbuildHtmlPlugin(config) { |
{ | ||
"name": "@ewas/esbuild-plugin-html", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -13,3 +13,4 @@ "main": "./dist/index.js", | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"template" | ||
], | ||
@@ -16,0 +17,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19210
9