-
-
Save sebastianroming/f039be3b7a9c2abbc672170995dfa494 to your computer and use it in GitHub Desktop.
Polymer 3 Code Template for WebStom, PhpStorm, All JetBrains IDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set($CLASS_NAME = "") | |
#set($part = "") | |
#if($NAME.endsWith(".js")) | |
#set($end = $NAME.length() - 3) | |
#set($NAME = "$NAME.substring(0,$end)") | |
#end | |
#foreach($part in $NAME.split("-")) | |
#set($CLASS_NAME = "${CLASS_NAME}$part.substring(0,1).toUpperCase()$part.substring(1).toLowerCase()") | |
#end | |
import { PolymerElement, html } from '/node_modules/@polymer/polymer/polymer-element.js'; | |
class ${CLASS_NAME} extends PolymerElement { | |
static get template() { | |
return html` | |
<style> | |
:host { | |
display: block; | |
} | |
</style> | |
<div>Hola mundo! Polymer 3</div> | |
`; | |
} | |
static get properties() { | |
return {}; | |
} | |
} | |
window.customElements.define('${NAME}', ${CLASS_NAME}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment