Skip to content

Commit

Permalink
Update Build Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed Jun 30, 2020
1 parent aab6dd1 commit a62768b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 35 deletions.
7 changes: 0 additions & 7 deletions .config/main.config.js

This file was deleted.

10 changes: 0 additions & 10 deletions .config/min.config.js

This file was deleted.

1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.config/
.github/
.vscode/
dev/
Expand Down
21 changes: 10 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* eslint no-undef: 0 */
// src/wc-blink.js
class WCBlink extends HTMLElement {
constructor () {
constructor() {
super();
const template = document.createElement('template');
const template = document.createElement("template");
template.innerHTML = WCBlink.template();
this.attachShadow({ mode: 'open' });
this.attachShadow({mode: "open"});
this.shadowRoot.appendChild(document.importNode(template.content, true));
}

static template () {
static template() {
return `
<style>
.blink {
Expand All @@ -27,10 +26,10 @@ class WCBlink extends HTMLElement {
}
</style>
<p class="blink" style="width: inherit;"><span><slot></slot></span></p>
`
`;
}
}

customElements.define('wc-blink', WCBlink);

export { WCBlink };
customElements.define("wc-blink", WCBlink);
export {
WCBlink
};
20 changes: 19 additions & 1 deletion index.min.js
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
class n extends HTMLElement{constructor(){super();const e=document.createElement("template");e.innerHTML=n.template(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(e.content,!0))}static template(){return'\n <style>\n .blink {\n animation: 2s linear infinite condemned_blink_effect;\n }\n @keyframes condemned_blink_effect {\n 0% {\n visibility: hidden;\n }\n 50% {\n visibility: hidden;\n }\n 100% {\n visibility: visible;\n }\n }\n </style>\n <p class="blink" style="width: inherit;"><span><slot></slot></span></p>\n '}}customElements.define("wc-blink",n);export{n as WCBlink};
class a extends HTMLElement{constructor(){super();const b=document.createElement("template");b.innerHTML=a.template(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(b.content,!0))}static template(){return`
<style>
.blink {
animation: 2s linear infinite condemned_blink_effect;
}
@keyframes condemned_blink_effect {
0% {
visibility: hidden;
}
50% {
visibility: hidden;
}
100% {
visibility: visible;
}
}
</style>
<p class="blink" style="width: inherit;"><span><slot></slot></span></p>
`}}customElements.define("wc-blink",a);export{a as WCBlink};
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
"scripts": {
"start": "npx live-server --no-browser --port=5500 --open=dev",
"lint": "esmtk lint",
"build": "npm run build:main && npm run build:min",
"build:main": "npx rollup --config .config/main.config.js",
"build:min": "npx rollup --config .config/min.config.js",
"build": "npm run bundle && npm run minify",
"bundle": "esmtk bundle src/wc-blink.js index.js",
"minify": "esmtk minify src/wc-blink.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": {
"esmtk": "^0.1.1",
"rollup-plugin-terser": "^5.2.0"
"esmtk": "^0.4.0"
},
"standard": {
"ignore": [
Expand Down

0 comments on commit a62768b

Please sign in to comment.