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
@builtin "string.ne" | |
@builtin "whitespace.ne" | |
MustacheStatement -> OPEN _ _Path (__ _Param):* (__ Hash):? _ CLOSE {% (data, location) => ({ | |
type: 'MustacheStatement', | |
path: data[2], | |
params: data[3].map(it => it[1]), | |
hash: data[4] && data[4][1], | |
range: { start: location, end: data[6].range.end }, | |
}) %} |
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
setopt prompt_subst | |
export LSCOLORS=ExGxFxDxCxHxHxCbCeEbEb | |
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}git%{$reset_color%}:" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}+" | |
ZSH_THEME_GIT_PROMPT_BRANCH="" | |
ZSH_THEME_GIT_PROMPT_SEPARATOR="" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
foo: 1, | |
actions: { | |
inc() { | |
this.set('foo', this.get('foo') + 1); | |
} |
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
class EmberAddonReferenceContributor : JSModuleReferenceContributor { | |
override fun getCommonJSModuleReferences(unquotedRefText: String, host: PsiElement, offset: Int, provider: PsiReferenceProvider?) = | |
emptyArray<PsiReference>() | |
override fun getAllReferences(unquotedRefText: String, host: PsiElement, offset: Int, provider: PsiReferenceProvider?): Array<FileReference> { | |
return EmberAddonFileReferenceSet(unquotedRefText, host, offset, provider).allReferences | |
} | |
override fun isApplicable(host: PsiElement) = host is ES6FromClause | |
} |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
myService: Ember.inject.service(), | |
init() { | |
this._super(...arguments); | |
this.set('controllerArray', ['xxx']); | |
}, |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
init() { | |
this._super(...arguments); | |
console.log(this.get('item.value')); | |
}, | |
}); |
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
ember-cli@2.4.3 C:\projects\ember-cli | |
├─┬ amd-name-resolver@0.0.5 | |
│ └── ensure-posix-path@1.0.1 | |
├── bower@1.7.9 | |
├─┬ bower-config@1.3.1 | |
│ ├── mout@1.0.0 | |
│ ├─┬ optimist@0.6.1 | |
│ │ └── wordwrap@0.0.3 | |
│ ├─┬ osenv@0.1.3 | |
│ │ └── os-homedir@1.0.1 |
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
ember-cli@2.4.3 C:\projects\ember-cli | |
├─┬ amd-name-resolver@0.0.5 | |
│ └── ensure-posix-path@1.0.1 | |
├── bower@1.7.9 | |
├─┬ bower-config@1.3.1 | |
│ ├── mout@1.0.0 | |
│ ├─┬ optimist@0.6.1 | |
│ │ └── wordwrap@0.0.3 | |
│ ├─┬ osenv@0.1.3 | |
│ │ └── os-homedir@1.0.1 |
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
export default function transformer(file, api) { | |
const j = api.jscodeshift; | |
const {expression, statement, statements} = j.template; | |
function argsArray(p) { | |
return j.variableDeclaration('var', [ | |
j.variableDeclarator( | |
j.identifier('args'), | |
p.node.argument.arguments[0] | |
) |
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
it('route foo', function() { | |
return emberNew() | |
.then(() => emberGenerateDestroy(['route', 'foo'], (file) => { | |
expect(file('app/routes/foo.js')) | |
.to.contain('import Ember from \'ember\';') | |
.to.contain('export default Ember.Route.extend({\n});'); | |
expect(file('app/templates/foo.hbs')) | |
.to.contain('{{outlet}}'); | |