-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimized for autocomplete+ snippets #4
Closed
imanghafoori1
wants to merge
51
commits into
mattmcmanus:master
from
imanghafoori1:optimized-for-auto-complete-snippets
Closed
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
ad3e9c6
model.cson added
imanghafoori1 2e3eb66
view.cson added
imanghafoori1 764adf6
route.cson added
imanghafoori1 6e0fa20
logger.cson added
imanghafoori1 61d7254
es6.cson added
imanghafoori1 a799831
controller.cson added
imanghafoori1 9e6d7a1
Update and rename snippets to snippets/computed.cson
imanghafoori1 926d56a
adapters.cson added
imanghafoori1 ebc8899
store.cson added
imanghafoori1 1527d3b
custom import added
imanghafoori1 77a39a9
.assert added
imanghafoori1 41139ce
verbose modes added
imanghafoori1 3b78d58
nested resources
imanghafoori1 cd29fbe
added features and a bug fix
imanghafoori1 23294ec
changing convention from . to _
imanghafoori1 b27d3f6
convention changed to _
imanghafoori1 07f09b9
custom import added
imanghafoori1 d791524
Update controller.cson
imanghafoori1 53ee063
match and alias added
imanghafoori1 13d52c7
Update adapters.cson
imanghafoori1 399b942
Update logger.cson
imanghafoori1 8ade0ab
Update model.cson
imanghafoori1 ac5b268
Update view.cson
imanghafoori1 08691ed
Update router.cson
imanghafoori1 61bbeea
Update router.cson
imanghafoori1 e9d1bb1
em_ prefix changed to ds_
imanghafoori1 8ceccea
Update store.cson
imanghafoori1 4a11a66
changed to _ mode
imanghafoori1 f2a7de1
em_ removed
imanghafoori1 454143f
em_ removed
imanghafoori1 1c3f093
em_ removed
imanghafoori1 2ac0628
em_ removed
imanghafoori1 5499a60
em_ removed
imanghafoori1 ddc5ef3
em_ removed
imanghafoori1 2aa2768
em_ removed
imanghafoori1 83476bb
em_ removed
imanghafoori1 5111f76
remove es6_
imanghafoori1 1606657
em_ removed
imanghafoori1 aa655dc
Update controller.cson
imanghafoori1 c31672b
model_ removed
imanghafoori1 2afced0
bug fix
imanghafoori1 4bc6828
Update model.cson
imanghafoori1 89f184d
prefixes added,
imanghafoori1 59b47a2
bug fix
imanghafoori1 3ae81bf
organized
imanghafoori1 d0ed384
Update router.cson
imanghafoori1 52672dd
@ removed
imanghafoori1 bc09835
Update route.cson
imanghafoori1 57a6456
Update model.cson
imanghafoori1 2ad1d30
Ember.run added
imanghafoori1 f1858ac
hints provided in titles.
imanghafoori1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
'.source.coffee': | ||
|
||
'Ember FixtureAdapter': | ||
'prefix': 'adapter_fixture' | ||
'body': | ||
""" | ||
_export = DS.FixtureAdapter.extend() | ||
""" | ||
|
||
|
||
'Ember RESTAdapter': | ||
'prefix': 'adapter_rest' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'body': | ||
""" | ||
_export = DS.RESTAdapter.extend( | ||
${1:#body} | ||
) | ||
|
||
|
||
_export.reopenClass FIXTURES: [ | ||
{ | ||
id: 1 | ||
${1}: "${2}" | ||
} | ||
{ | ||
id: 2 | ||
${3}: "${4}" | ||
} | ||
] | ||
""" | ||
|
||
|
||
'Ember ActiveModelAdapter': | ||
'prefix': 'adapter_activeModel' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'body': | ||
""" | ||
_export = DS.ActiveModelAdapter.extend( | ||
${1:#body} | ||
) | ||
""" | ||
|
||
|
||
|
||
|
||
|
||
'FixtureAdapter': | ||
'prefix': 'fixture_adapter' | ||
'body': | ||
""" | ||
_export = DS.FixtureAdapter.extend() | ||
""" | ||
|
||
|
||
'RESTAdapter': | ||
'prefix': 'rest_adapter' | ||
'body': | ||
""" | ||
_export = DS.RESTAdapter.extend( | ||
${1:#body} | ||
) | ||
|
||
|
||
_export.reopenClass FIXTURES: [ | ||
{ | ||
id: 1 | ||
${1}: "${2}" | ||
} | ||
{ | ||
id: 2 | ||
${3}: "${4}" | ||
} | ||
] | ||
""" | ||
|
||
|
||
'ActiveModelAdapter': | ||
'prefix': 'activemodel_adapter' | ||
'body': | ||
""" | ||
_export = DS.ActiveModelAdapter.extend( | ||
${1:#body} | ||
) | ||
""" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
'.source.coffee': | ||
|
||
|
||
'Ember.computed.gt(...': | ||
'prefix': 'computed_gt' | ||
'body': "Ember.computed.gt( '${1:property}' , ${2:0} ) ${3:# (returns a boolean)}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.lt(...': | ||
'prefix': 'computed_lt' | ||
'body': "Ember.computed.lt( '${1:property}' , ${2:0} ) ${3:# (returns a boolean)}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.or(...': | ||
'prefix': 'computed_or' | ||
'body': "Ember.computed.or( '${1:property_1}' , '${2:property_2}' ) ${3:# (returns a boolean)}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.and(...': | ||
'prefix': 'computed_and' | ||
'body': "Ember.computed.and( '${1:property_1}' , '${2:property_2}' ) ${3:# (returns a boolean)}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.max(...': | ||
'prefix': 'computed_max' | ||
'body': "Ember.computed.max( '${1:array_property}' ) ${2:# (returns the max as a number)}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.min(...': | ||
'prefix': 'computed_min' | ||
'body': "Ember.computed.min( '${1:array_property}' ) ${2:# (returns the min as a number)}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.map(...': | ||
'prefix': 'computed_map' | ||
'body': """ Ember.computed.map( '${1:array_property}', (item, index) -> | ||
${2:#example logic | ||
altered_item = item + "some_string" | ||
return altered_item } | ||
|
||
${3:# outputs a new array} | ||
""" | ||
|
||
|
||
|
||
|
||
'Ember.computed.mapBy(...': | ||
'prefix': 'computed_mapBy' | ||
'body': "Ember.computed.mapBy( '${1:array_of_objs}','${2:obj_key}' ) ${3:# outputs a simple array[] of items} " | ||
|
||
|
||
|
||
|
||
'Ember.computed.filter(...': | ||
'prefix': 'computed_filter' | ||
'body': | ||
""" | ||
Ember.computed.filter( '${1:array_property}', ( item, index, array ) -> | ||
${2:#logic.. (should return a boolean)} | ||
""" | ||
|
||
|
||
|
||
|
||
'Ember.computed.filterBy(...': | ||
'prefix': 'computed_filterBy' | ||
'body': "Ember.computed.filterBy( '${1:array_of_objs}','${2:obj_key}', ${3:value} ) ${4:#returns filtered array[]}" | ||
|
||
|
||
|
||
|
||
'Ember.computed.empty(...': | ||
'prefix': 'computed_empty' | ||
'body': "Ember.computed.empty( '${1:propery}' ) ${2:#returns boolean}" | ||
|
||
|
||
|
||
|
||
|
||
'Ember.computed.match(...': | ||
'prefix': 'computed_match' | ||
'body': "Ember.computed.match( '${1:statement}' , /^${2:regex}$/ ) (# returns a boolean)" | ||
|
||
|
||
|
||
|
||
'Ember.computed.alias(...': | ||
'prefix': 'computed_alias' | ||
'body': "Ember.computed.alias( '${1:statement}' ) (# returns a boolean)" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
'.source.coffee': | ||
|
||
|
||
'Ember.ObjectController.extend(...': | ||
'prefix': 'objectController' | ||
'body': | ||
""" | ||
_export = Ember.ObjectController.extend( | ||
actions: | ||
${2:name}: -> | ||
${3:#logic...} | ||
) | ||
""" | ||
|
||
|
||
|
||
|
||
'Ember.ArrayController.extend(...': | ||
'prefix': 'arrayController' | ||
'body': | ||
""" | ||
_export = Ember.ArrayController.extend( | ||
actions: | ||
${2:name}: -> | ||
${3:#logic...} | ||
|
||
) | ||
""" | ||
|
||
|
||
|
||
'Ember.controller.extend(...': | ||
'prefix': 'controller' | ||
'body': | ||
""" | ||
_export = Ember.controller.extend( | ||
actions: | ||
${2:name}: -> | ||
${3:#logic...} | ||
) | ||
""" | ||
|
||
|
||
|
||
'itemController : ...': | ||
'prefix': 'arrayController_itemController' | ||
'body': "itemController : '${1:an_objController}'}" | ||
|
||
|
||
'sortProperties : ...': | ||
'prefix': 'arrayController_sortProperties' | ||
'body': "sortProperties : ['${1:property}']}" | ||
|
||
|
||
'sortAscending : ...': | ||
'prefix': 'arrayController_sortAscending' | ||
'body': "sortAscending : ['${1:false}']}" | ||
|
||
|
||
|
||
|
||
|
||
'itemController: ...': | ||
'prefix': 'itemController' | ||
'body': "itemController : '${1:an_objController}'}" | ||
|
||
|
||
'sortProperties: ...': | ||
'prefix': 'sortProperties' | ||
'body': "sortProperties : ['${1:property}']}" | ||
|
||
|
||
'sortAscending: ...': | ||
'prefix': 'sortAscending' | ||
'body': "sortAscending : ['${1:false}']}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
'.source.coffee': | ||
|
||
|
||
'import Ember from': | ||
'prefix': 'es6_import_ember' | ||
'body': | ||
""" | ||
`import Ember from "ember";` | ||
${1} | ||
""" | ||
|
||
'import Ember from...': | ||
'prefix': 'import_ember' | ||
'body': | ||
""" | ||
`import Ember from "ember";` | ||
${1} | ||
""" | ||
|
||
|
||
|
||
|
||
'import DS from': | ||
'prefix': 'es6_import_ds' | ||
'body': | ||
""" | ||
`import DS from 'ember-data';` | ||
${1} | ||
""" | ||
|
||
'import DS from...': | ||
'prefix': 'import_ds' | ||
'body': | ||
""" | ||
`import DS from 'ember-data';` | ||
${1} | ||
""" | ||
|
||
|
||
'import custom from': | ||
'prefix': 'es6_import_custom' | ||
'body': | ||
""" | ||
`import ${1:var} from './${2}';` | ||
${3} | ||
""" | ||
|
||
|
||
'import custom from...': | ||
'prefix': 'import_custom' | ||
'body': | ||
""" | ||
`import ${1:var} from './${2}';` | ||
${3} | ||
""" | ||
|
||
'export Default': | ||
'prefix': 'es6_export_default' | ||
'body': | ||
""" | ||
|
||
${2} | ||
|
||
|
||
`export default ${1:_export};` | ||
""" | ||
|
||
|
||
|
||
'export Default...': | ||
'prefix': 'export_default' | ||
'body': | ||
""" | ||
|
||
${2} | ||
|
||
|
||
`export default ${1:_export};` | ||
""" | ||
|
||
|
||
|
||
|
||
'both imports and export...': | ||
'prefix': 'es6_fullset' | ||
'body': | ||
""" | ||
${1:`import Ember from 'ember';`} | ||
${2:`import DS from 'ember-data';`} | ||
|
||
|
||
|
||
${3} | ||
|
||
|
||
|
||
`export default _export;` | ||
|
||
""" |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixture_adapter