{"id":33054387,"url":"https://github.com/robdodson/PolymerSnippets","last_synced_at":"2025-11-15T10:01:24.689Z","repository":{"id":14670403,"uuid":"17389214","full_name":"robdodson/PolymerSnippets","owner":"robdodson","description":"Sublime snippets for Polymer and Web Components","archived":false,"fork":false,"pushed_at":"2018-02-04T11:01:14.000Z","size":81,"stargazers_count":222,"open_issues_count":8,"forks_count":49,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-24T08:37:15.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"src-d/proteus","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robdodson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-04T03:32:07.000Z","updated_at":"2025-04-03T08:51:56.000Z","dependencies_parsed_at":"2022-09-05T11:21:44.511Z","dependency_job_id":null,"html_url":"https://github.com/robdodson/PolymerSnippets","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/robdodson/PolymerSnippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robdodson%2FPolymerSnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robdodson%2FPolymerSnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robdodson%2FPolymerSnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robdodson%2FPolymerSnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robdodson","download_url":"https://codeload.github.com/robdodson/PolymerSnippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robdodson%2FPolymerSnippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284538091,"owners_count":27022334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-15T02:00:06.050Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-14T04:00:21.582Z","updated_at":"2025-11-15T10:01:24.682Z","avatar_url":"https://github.com/robdodson.png","language":null,"funding_links":[],"categories":["Libraries and Frameworks"],"sub_categories":["Polymer"],"readme":"# Polymer Snippets for Sublime\n\n## Install\n\nTo install through [Package Control](http://wbond.net/sublime_packages/package_control),\nsearch for **Polymer \u0026 Web Component Snippets**. If you still don't have Package Control in Sublime Text, [go get it](http://wbond.net/sublime_packages/package_control/installation).\nIt's pure awesomeness.\n\nIf you don't use Package Control, you can download the package and put it manually inside your `Packages` directory. It should work but will not update automatically.\n\n## Elements\n\nType the name of [any `iron-*` or `paper-*` element](https://elements.polymer-project.org), then hit `tab` to auto complete. Ex:\n\n![Using snippets](https://cloud.githubusercontent.com/assets/1066253/8323071/77f4173c-19f4-11e5-94d2-a22e3b3e526e.gif)\n\nOR, start typing the prefix for an element and hit `ctrl+space` to fuzzy search for a completion. Ex:\n\n![Fuzz auto complete](https://cloud.githubusercontent.com/assets/1066253/8323081/87cd9890-19f4-11e5-9005-bf627ab30ea5.gif)\n\n## Polymer\n\n### [pe] polymer element\n\n```html\n\u003cdom-module id=\"$1\"\u003e\n\t\u003ctemplate\u003e\n\t\t\u003cstyle\u003e\n\t\t\t:host {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t\u003c/style\u003e\n\t\t$2\n\t\u003c/template\u003e\n\t\u003cscript\u003e\n\t\tPolymer({\n\t\t\tis: '$1'\n\t\t});\n\t\u003c/script\u003e\n\u003c/dom-module\u003e\n```\n\n### [pes] polymer element with external stylesheet\n\n```html\n\u003cdom-module id=\"$1\"\u003e\n\t\u003clink rel=\"import\" type=\"css\" href=\"$1.css\"\u003e\n\t\u003ctemplate\u003e\n\t\t$2\n\t\u003c/template\u003e\n\t\u003cscript\u003e\n\t\tPolymer({\n\t\t\tis: '$1'\n\t\t});\n\t\u003c/script\u003e\n\u003c/dom-module\u003e\n```\n\n### [hi] html import *(I use this one a lot)*\n\n```html\n\u003clink rel=\"import\" href=\"${1:bower_components}/${0}/${0}.html\"\u003e\n```\n\n### [hii] html import iron-* element\n\n```html\n\u003clink rel=\"import\" href=\"${1:bower_components}/iron-${2}/iron-${2}.html\"\u003e\n```\n\n### [hip] html import paper-* element\n\n```html\n\u003clink rel=\"import\" href=\"${1:bower_components}/paper-${2}/paper-${2}.html\"\u003e\n```\n\n## Web Components\n\n### [template] template\n```html\n\u003ctemplate$1\u003e$0\u003c/template\u003e\n```\n\n### [ce] custom element\n\n```javascript\nvar ${4:tmpl} = document.querySelector('${5:template}');\n\nvar ${1:WidgetProto} = Object.create(HTMLElement.prototype);\n\n${1:WidgetProto}.createdCallback = function() {\n\tvar root = this.createShadowRoot();\n\troot.appendChild(document.importNode(${4:tmpl}.content, true));\n};\n\nvar ${2:Widget} = document.registerElement('${3:my-widget}', {\n\tprototype: ${1:WidgetProto}\n});\n```\n\n## HTML\n\n### [ph] HTML template with Web Components polyfill\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\t\u003cmeta charset=\"utf-8\"\u003e\n\n\t\u003ctitle\u003e${1}\u003c/title\u003e\n\t\u003cmeta name=\"description\" content=\"${2}\"\u003e\n\n\t\u003c!-- Mobile --\u003e\n\t\u003cmeta name=\"viewport\" content=\"width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes\"\u003e\n\n\t\u003c!-- Chrome / Android --\u003e\n\t\u003cmeta name=\"mobile-web-app-capable\" content=\"yes\"\u003e\n\t\u003cmeta name=\"theme-color\" content=\"black\"\u003e\n\t\u003clink rel=\"icon\" href=\"icon.png\"\u003e\n\n\t\u003c!-- Safari / iOS --\u003e\n\t\u003cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\"\u003e\n\t\u003cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\"\u003e\n\t\u003clink rel=\"apple-touch-icon-precomposed\" href=\"apple-touch-icon.png\"\u003e\n\n\t\u003c!-- Web Components --\u003e\n\t\u003cscript src=\"bower_components/webcomponentsjs/webcomponents-lite.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody unresolved\u003e\n\t$0\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -m 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## License\n\n[MIT License](http://robdodson.mit-license.org/) © Rob Dodson\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobdodson%2FPolymerSnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobdodson%2FPolymerSnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobdodson%2FPolymerSnippets/lists"}