Go to atom > Preferences...
then search for Polymer Snippets in Packages tab.
${1:<link rel="import" href="../polymer/polymer.html">}
<polymer-element name="${2}" attributes="${3}">
<template>
<style>
:host {
display: block;
}
</style>$4
</template>
<script>
Polymer('$2', {
});
</script>
</polymer-element>
${1:<link rel="import" href="../polymer/polymer.html">}
<polymer-element name="${2}" noscript>
<template>
<style>
:host {
display: block;
}
</style>$4
</template>
</polymer-element>
<link rel="import" href="${1:bower_components}/core-${2}/core-${2}.html">
<link rel="import" href="${1:bower_components}/polymer-ui-${2}/polymer-ui-${2}.html">
<template$1>$0</template>
<link rel="import" href="${0}">
var ${4:tmpl} = document.querySelector('${5:template}');
var ${1:WidgetProto} = Object.create(HTMLElement.prototype);
${1:WidgetProto}.createdCallback = function() {
var root = this.createShadowRoot();
root.appendChild(document.importNode(${4:tmpl}.content, true));
};
var ${2:Widget} = document.registerElement('${3:my-widget}', {
prototype: ${1:WidgetProto}
});
/shadow/ ${2:target} {
$0
}
/shadow-deep/ ${2:target} {
$0
}
${1:content} /content/ ${2:target} {
$0
}
:host$0
:ancestor($0)
polyfill-next-selector { content: '${1::host > .foo}'; }$0
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT License © Rob Dodson