Skip to content

Instantly share code, notes, and snippets.

@TobiasSeitz
Last active May 15, 2017 06:50
Show Gist options
  • Save TobiasSeitz/791506e55339bc389208c7b6279259bd to your computer and use it in GitHub Desktop.
Save TobiasSeitz/791506e55339bc389208c7b6279259bd to your computer and use it in GitHub Desktop.
Polymer 2 Element Template Webstorm/IntelliJ (Bare Minimum)
<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>
@TobiasSeitz
Copy link
Author

This should work if the element is placed in a folder that is a sibling to the bower_components directory (e.g. /src/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment