Last active
May 15, 2017 06:50
-
-
Save TobiasSeitz/791506e55339bc389208c7b6279259bd to your computer and use it in GitHub Desktop.
Polymer 2 Element Template Webstorm/IntelliJ (Bare Minimum)
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
<link rel="import" href="../bower_components/polymer/polymer-element.html"> | |
<link rel="import" href="shared-styles.html"> | |
<dom-module id="$NAME"> | |
<template> | |
<style include="shared-styles"> | |
:host { | |
display: block; | |
} | |
</style> | |
</template> | |
<script> | |
class $ElementName extends Polymer.Element { | |
static get is() { return '$NAME'; } | |
} | |
window.customElements.define(($ElementName).is, $ElementName); | |
</script> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should work if the element is placed in a folder that is a sibling to the
bower_components
directory (e.g./src/
)