Skip to content

Commit f26b187

Browse files
committed
Improve formats
1 parent 412b82e commit f26b187

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Is this package missing your favorite addon or snippet? It's super easy to contr
199199
3. Fill in the files with following structure:
200200
```js
201201
module.exports = {
202-
"[my-addon] superFunction": {
202+
"superFunction": {
203203
"prefix": "imsuperFunction",
204204
"body": "import { superFunction } from 'my-addon';",
205205
"description": "superFunction allows you to do super things"

src/handlebars/ember/components.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module.exports = {
2-
"[ember] input": {
2+
"input": {
33
"prefix": "input",
44
"body": "<Input @value=${1} />",
55
"description": "The {{input}} helper lets you create an HTML <input /> component."
66
},
7-
"[ember] textarea": {
7+
"textarea": {
88
"prefix": "textarea",
99
"body": "<Textarea @value=${1} />",
1010
"description": "The {{textarea}} helper lets you create an HTML <textarea /> component."
1111
},
12-
"[ember] link-to": {
12+
"link-to": {
1313
"prefix": "linkto",
1414
"body": "<LinkTo @route=\"${1}\">\n\t${2}\n</LinkTo>",
1515
"description": "The {{link-to}} component renders a link to the supplied routeName."

src/handlebars/ember/hbs-helpers.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
module.exports = {
2-
"[ember] #each": {
2+
"#each": {
33
"prefix": "each",
44
"body": "{{#each ${1} as |${2}|}}\n\t${3}\n{{/each}}",
55
"description": "The {{#each}} helper loops over elements in a collection."
66
},
7-
"[ember] #each-in": {
7+
"#each-in": {
88
"prefix": "each-in",
99
"body": "{{#each-in ${1} as |${2} ${3}|}}\n\t${4}\n{{/each-in}}",
1010
"description": "The {{each-in}} helper loops over properties on an object."
1111
},
12-
"[ember] #each/else": {
12+
"#each/else": {
1313
"prefix": "eachelse",
1414
"body": "{{#each ${1} as |${2}|}}\n\t${3}\n{{else}}\n\t${4}\n{{/each}}",
1515
"description": "The {{#each}} helper loops over elements in a collection."
1616
},
17-
"[ember] #if hasBlock": {
17+
"#if hasBlock": {
1818
"prefix": "ifhasBlock",
1919
"body": "{{#if (hasBlock)}}\n\t${1}\n{{/if}}",
2020
"description": "Indicates if the component was invoked with a block."
2121
},
22-
"[ember] #if hasBlockParams": {
22+
"#if hasBlockParams": {
2323
"prefix": "ifhasBlockParams",
2424
"body": "{{#if (hasBlockParams)}}\n\t${1}\n{{/if}}",
2525
"description": "Indicates if the component was invoked with block params."
2626
},
27-
"[ember] if": {
27+
"if": {
2828
"prefix": "if",
2929
"body": "{{if ${1} ${2} ${3}}}",
3030
"description": "The if helper allows you to conditionally render one of two branches, depending on the 'truthiness' of a property."
3131
},
32-
"[ember] #if": {
32+
"#if": {
3333
"prefix": "if",
3434
"body": "{{#if ${1}}}\n\t${3}\n{{/if}}",
3535
"description": "The if helper allows you to conditionally render one of two branches, depending on the 'truthiness' of a property."
3636
},
37-
"[ember] #if/else": {
37+
"#if/else": {
3838
"prefix": "if",
3939
"body": "{{#if ${1}}}\n\t${2}\n{{else}}\n\t${3}\n{{/if}}",
4040
"description": "The if helper allows you to conditionally render one of two branches, depending on the 'truthiness' of a property."
4141
},
42-
"[ember] unless": {
42+
"unless": {
4343
"prefix": "unless",
4444
"body": "{{unless ${1} ${2} ${3}}}",
45-
"description": "[ember] unless"
45+
"description": "unless"
4646
},
47-
"[ember] else": {
47+
"else": {
4848
"prefix": "else",
4949
"body": "{{else}}",
50-
"description": "[ember] else"
50+
"description": "else"
5151
},
52-
"[ember] #unless": {
52+
"#unless": {
5353
"prefix": "unless",
5454
"body": "{{#unless ${1}}}\n\t${2}\n{{/unless}}",
5555
"description": "The unless helper is the inverse of the if helper. It displays if a value is falsey (\"not true\" or \"is false\"). "
5656
},
57-
"[ember] #unless/else": {
57+
"#unless/else": {
5858
"prefix": "unless",
5959
"body": "{{#unless ${1}}}\n\t${2}\n{{else}}\n\t${3}\n{{/unless}}",
6060
"description": "The unless helper is the inverse of the if helper. It displays if a value is falsey (\"not true\" or \"is false\"). "
6161
},
62-
"[ember] with": {
62+
"with": {
6363
"prefix": "with",
6464
"body": "{{#with ${1} as |${2}|}}\n\t${3}\n{{/with}}",
65-
"description": "[ember] with"
65+
"description": "with"
6666
},
67-
"[ember] log": {
67+
"log": {
6868
"prefix": "log",
6969
"body": "{{log ${1}}}",
7070
"description": "log allows you to output the value of variables in the current rendering context. log also accepts primitive types such as strings or numbers."
7171
},
72-
"[ember] yield": {
72+
"yield": {
7373
"prefix": "yield",
7474
"body": "{{yield}}",
7575
"description": "{{yield}} denotes an area of a template that will be rendered inside of another template."

src/handlebars/ember/helpers.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
module.exports = {
2-
"[ember] action": {
2+
"action": {
33
"prefix": "action",
44
"body": "(action ${1})",
55
"description": "The {{action}} helper provides a way to pass triggers for behavior (usually just a function) between components, and into components from controllers."
66
},
7-
"[ember] array": {
7+
"array": {
88
"prefix": "array",
99
"body": "(array ${1})",
1010
"description": "Use the {{array}} helper to create an array to pass as an option to your components."
1111
},
12-
"[ember] hash": {
12+
"hash": {
1313
"prefix": "hash",
1414
"body": "(hash ${1})",
1515
"description": "Use the {{hash}} helper to create a hash to pass as an option to your components."
1616
},
17-
"[ember] component": {
17+
"component": {
1818
"prefix": "component",
1919
"body": "{{component ${1}}}",
2020
"description": "The {{component}} helper lets you add instances of Component to a template."
2121
},
22-
"[ember] #component": {
22+
"#component": {
2323
"prefix": "component",
2424
"body": "{{#component ${1}}}\n\t${2}\n{{/component}}",
2525
"description": "The {{component}} helper lets you add instances of Component to a template."
2626
},
27-
"[ember] concat": {
27+
"concat": {
2828
"prefix": "concat",
2929
"body": "{{concat ${1} ${2}}}",
3030
"description": "Concatenates the given arguments into a string."
3131
},
32-
"[ember] debugger": {
32+
"debugger": {
3333
"prefix": "debugger",
3434
"body": "{{debugger}}",
3535
"description": "Execute the debugger statement in the current template's context."
3636
},
37-
"[ember] fn": {
37+
"fn": {
3838
"prefix": "fn",
3939
"body": "(fn ${1})",
4040
"description": "The fn helper allows you to ensure a function that you are passing off to another component, helper, or modifier has access to arguments that are available in the template."
4141
},
42-
"[ember] get": {
42+
"get": {
4343
"prefix": "get",
4444
"body": "{{get ${1} ${2}}}",
4545
"description": "Dynamically look up a property on an object. "
4646
},
47-
"[ember] let": {
47+
"let": {
4848
"prefix": "let",
4949
"body": "{{#let ${1} as |${2}|}}\n\t${3}\n{{/let}}",
5050
"description": "The let helper receives one or more positional arguments and yields them out as block params."
5151
},
52-
"[ember] mount": {
52+
"mount": {
5353
"prefix": "mount",
5454
"body": "{{mount ${1}}}",
55-
"description": "[ember] mount"
55+
"description": "mount"
5656
},
57-
"[ember] mut": {
57+
"mut": {
5858
"prefix": "mut",
5959
"body": "(mut ${1})",
6060
"description": "The mut helper lets you clearly specify that a child Component can update the (mutable) value passed to it, which will change the value of the parent component."
6161
},
62-
"[ember] on": {
62+
"on": {
6363
"prefix": "on",
6464
"body": "{{on ${1} ${2}}}",
6565
"description": "The {{on}} modifier lets you easily add event listeners (it uses EventTarget.addEventListener internally)."
6666
},
67-
"[ember] outlet": {
67+
"outlet": {
6868
"prefix": "outlet",
6969
"body": "{{outlet ${1} ${2}}}",
7070
"description": "The {{outlet}} helper lets you specify where a child route will render in your template"
7171
},
72-
"[ember] query-params": {
72+
"query-params": {
7373
"prefix": "query-params",
7474
"body": "(query-params ${1})",
7575
"description": "This is a helper to be used in conjunction with the link-to helper. It will supply url query parameters to the target route."

0 commit comments

Comments
 (0)