Skip to content

Commit

Permalink
Upgrade ESMTK
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed May 11, 2021
1 parent 6103875 commit 3875a2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function interpolate(template, tags = {}) {
throw new TemplateException(template, tags, e);
}
}
class TemplateException extends Error {
var TemplateException = class extends Error {
constructor(template, tags, message) {
super();
this.name = "TemplateError";
Expand All @@ -20,10 +20,10 @@ class TemplateException extends Error {
msg += message;
this.message = msg;
}
}
};

// src/wc-template.js
class WCTemplate extends HTMLElement {
var WCTemplate = class extends HTMLElement {
static get observedAttributes() {
return ["src", "context"];
}
Expand Down Expand Up @@ -90,7 +90,7 @@ class WCTemplate extends HTMLElement {
render() {
this.innerHTML = interpolate(this.__template, this.__context);
}
}
};
customElements.define("wc-template", WCTemplate);
export {
WCTemplate
Expand Down
8 changes: 4 additions & 4 deletions index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"scripts": {
"start": "npx live-server --no-browser --port=5500 --open=dev",
"lint": "esmtk lint",
"build": "npm run bundle && npm run minify",
"bundle": "esmtk bundle src/wc-template.js index.js",
"minify": "esmtk minify src/wc-template.js index.min.js",
"build": "npm run build:esm && npm run build:min",
"build:esm": "esmtk bundle src/wc-template.js index.js",
"build:min": "esmtk minify src/wc-template.js index.min.js",
"package": "npx rimraf package && npm pack | tail -n 1 | xargs tar -xf",
"preversion": "npm run lint",
"postversion": "git push --follow-tags"
},
"devDependencies": {
"@vanillaes/interpolate": "^1.4.0",
"esmtk": "^0.4.0"
"esmtk": "^0.5.6"
},
"standard": {
"ignore": [
Expand Down

0 comments on commit 3875a2f

Please sign in to comment.