This file contains hidden or 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({ | |
didInsertElement: function() { | |
this._super(); | |
this.get('parent.children').addObject(this); | |
}, | |
total: Ember.computed.alias('parent.total'), | |
rand: Ember.computed('parent.model.array.[]', '[email protected]', 'total', function() { | |
return { value: Math.random(100) }; |
This file contains hidden or 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
'use strict'; | |
const Writer = require('broccoli-caching-writer'); | |
function strip(str) { | |
return str.toString().replace(/\s/g, ''); | |
} | |
function Base(inputNodes, opts) { | |
const options = opts || {}; |
This file contains hidden or 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
'use strict'; | |
const extend = require('./filter-components').extend; | |
module.exports = extend({ | |
filter: function(string, fileName) { | |
return string.trim() === '{{yield}}'; | |
} | |
}); |
This file contains hidden or 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 describe from 'mocha'; | |
console.icryeverytiem('tears'); // this should throw an error in the console but doesnt | |
// the rest of the tests continue to run though | |
// this never runs | |
describe('my test', function() { | |
}); |
This file contains hidden or 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
/* jshint node: true */ | |
'use strict'; | |
var path = require('path'); | |
var mergeTrees = require('broccoli-merge-trees'); | |
var babel = require('broccoli-babel-transpiler'); | |
var lodashPlugin = require('babel-plugin-lodash'); | |
module.exports = { | |
name: 'lodash', |
This file contains hidden or 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
{ chalk: [ '1.1.3' ], | |
'ansi-styles': [ '2.2.1' ], | |
'escape-string-regexp': [ '1.0.5' ], | |
'has-ansi': [ '2.0.0' ], | |
'ansi-regex': [ '2.0.0' ], | |
'strip-ansi': [ '3.0.1' ], | |
'supports-color': [ '2.0.0' ], | |
debug: [ '0.7.4', '2.2.0', '2.3.2' ], | |
ms: [ '0.7.1', '0.7.2' ], | |
wreck: [ '10.0.0' ], |
This file contains hidden or 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
let deps = require('./deps'); | |
let _ = require('lodash'); | |
let execSync = require('child_process').execSync; | |
let glob = require('glob').sync; | |
function mapDeepVersions(dependencies, dependencyMap) { | |
Object.keys(dependencies).forEach((key) => { | |
let dependency = dependencies[key]; | |
let versions = dependencyMap[key] = dependencyMap[key] || []; | |
versions.push(dependency.version); |
This file contains hidden or 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
var through = require('through'); | |
console.log('before through'); | |
through(function(chunk, enc, callback) { | |
throw new Error('laksdjf'); | |
console.log('through'); | |
this.emit('data', 'hi'); | |
setTimeout(() => { | |
console.log('abort'); | |
this.abort(); |
This file contains hidden or 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'; | |
Ember.Controller.reopen({ | |
transitionToRoute(routeName, ...params) { | |
const anyNonPrimitives = params.find(p => typeof p === 'object' && p !== null); | |
console.log('params', params); | |
console.log('anyNonPrimitives', anyNonPrimitives); |
This file contains hidden or 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', | |
model() { | |
return this.store.peekAll('post'); | |
} | |
}); |