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
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
View blueprint-helper-transform.js
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]
)
View api.js
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}}');
View proxy-test.js
var http = require('http');
var httpProxy = require('http-proxy');
var request = require('supertest');
var proxied = http.createServer(function (req, res) {
console.log('proxied: request received');
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('okay');
});