View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View test.js
'use strict';
const broccoliTestHelper = require('broccoli-test-helper');
const expect = require('chai').expect;
const EmberApp = require('../../../../lib/broccoli/ember-app');
const MockCLI = require('../../../helpers/mock-cli');
const Project = require('../../../../lib/models/project');
const buildOutput = broccoliTestHelper.buildOutput;
View cli-tags.json
{
"versions": [
{
"previous": null,
"version": "v0.0.13"
},
{
"previous": "v0.0.13",
"version": "v0.0.14"
},
View handlebars.ne
@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 },
}) %}
View mitsuhiko.zsh-theme
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=""
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
foo: 1,
actions: {
inc() {
this.set('foo', this.get('foo') + 1);
}
View EmberAddonReferenceContributor.kt
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
}
View controllers.index.js
import Ember from 'ember';
export default Ember.Controller.extend({
myService: Ember.inject.service(),
init() {
this._super(...arguments);
this.set('controllerArray', ['xxx']);
},
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
console.log(this.get('item.value'));
},
});
View npm.log
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