Last active
December 21, 2015 01:19
-
-
Save cletusw/6226703 to your computer and use it in GitHub Desktop.
Here's a Sublime Text snippet for quickly creating polymer-elements. Just type "<polymer" and press TAB to generate the empty element, then tab through the different fields to add a name (which is automatically mirrored to the Polymer() call), attribute default values in the prototype (which are automatically mirrored to the "attributes" attribu…
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
<snippet> | |
<content><![CDATA[ | |
<link rel="import" href="../../bower_components/polymer/polymer.html"> | |
<polymer-element name="$1" attributes="${2/:[^\n$]*(\n[ \t]*|$)/ /g}"> | |
<template> | |
<style> | |
:host { | |
display: block; | |
} | |
</style>$3 | |
</template> | |
<script> | |
Polymer('$1', { | |
$2 | |
}); | |
</script> | |
</polymer-element> | |
]]></content> | |
<tabTrigger><polymer</tabTrigger> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using ":host" instead of deprecated "@host".