Open
Conversation
Closed
Author
|
Made some fixes, can close and make a new pull request if desired:
|
| @@ -0,0 +1,49 @@ | |||
| <snippet> | |||
| <content><![CDATA[ | |||
| <link rel="import" href="${1:../../bower_components}/polymer/polymer.html"> | |||
There was a problem hiding this comment.
Should this not be polymer/polymer-element.html now?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snippets that are relatively synonymous with the
peandpessnippets, but with the new ES6 spec used with polymer 2.0.The
pe2andpes2shortcuts are used to generate the boilerplate element code, the latter being near-identical but with an external stylesheet reference instead. Could also be logically changed top2e, or replacepeand have the original polymer element snippet have a different shortcut, such aspel(for legacy).For both, the tab fields follow similarly to their legacy counterparts, with
$1at the start polymer import path,$2filling in the name of the element in all relevant fields, and, for the external stylesheet snippet,$3is used to fill the name of the stylesheet to use.There is also a regex substitution in 3 places that turns the
$2field from its expected slug-case to camelCase for use as the class name at declaration, and in the two arguments of the finalwindow.customElements.define()call for the element.Other than the regex-replacement, the only other relative difference from the original polymer element snippets are a default properties definition, with one property named
prop1that has a string value set by field$2and a<h2>Hello [[prop1]]</h2>in the template (similar to the polymer-cli element boilerplate).