1+ {
2+ // Place your Oriole workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+ // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+ // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+ // used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+ // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7+ // Placeholders with the same ids are connected.
8+ // Example:
9+ // "Print to console": {
10+ // "scope": "javascript,typescript",
11+ // "prefix": "log",
12+ // "body": [
13+ // "console.log('$1');",
14+ // "$2"
15+ // ],
16+ // "description": "Log output to console"
17+ // }
18+
19+ "Component" : {
20+ "scope" : " typescript" ,
21+ "prefix" : " component" ,
22+ "description" : " Generate a bare bones Oriole component" ,
23+ "body" : [
24+ " import { LitElement, css, html, customElement } from \" lit-element\" ;" ,
25+ " import { globalStyles } from \" ../globalStyles\" ;" ,
26+ " " ,
27+ " @customElement('ori-${TM_FILENAME_BASE/(.*)\\ ..+$/${1:/lowercase}/}')" ,
28+ " export class ${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g} extends LitElement {" ,
29+ " \t " ,
30+ " \t render() {" ,
31+ " \t\t return html`<div class=\" ${TM_FILENAME_BASE/(.*)\\ ..+$/${1:/lowercase}/}\" >$0</div>`;" ,
32+ " \t }" ,
33+ " \t " ,
34+ " \t static get styles() {" ,
35+ " \t\t return [" ,
36+ " \t\t\t globalStyles," ,
37+ " \t\t\t css``" ,
38+ " \t\t ];" ,
39+ " \t }" ,
40+ " }" ,
41+ " "
42+ ]
43+ }
44+ }
0 commit comments