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
{ | |
"build_dir": "build", | |
"app_file": "build/ember-runtime.js", | |
"src": [ "lib/core.js", | |
"lib/system/string.js", | |
"lib/ext/string.js", | |
"lib/ext/function.js", |
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
function readSource(after) { | |
var remainingWork; | |
var fileContents; | |
console.log('Reading source files...'); | |
remainingWork = settings.src.length; | |
fileContents = new Array(remainingWork); | |
settings.src.forEach(function(f, index) { | |
fs.readFile(f, function(err, data) { |
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
function readSource(after) { | |
console.log('Reading source files...'); | |
settings.src.pmap(fs.readFile, function(err, data, filename) { | |
return {'file': filename, | |
'data': data}; | |
}, after); | |
} |
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
pmap: function(operation, mapping, then) { | |
var ret = new Array(this.length); | |
var remainingWork = this.length; | |
this.forEach(function(x, idx, i) { | |
operation.call(null, x, function() { | |
var extendedArgs = Array.prototype.slice.call(arguments); | |
var mappedVal; | |
extendedArgs.push(x); |
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
var b=get(this,"view"); | |
b&&(Ember.$.isReady===YES?b.appendTo(a.get("rootElement")||"body"):Ember.$(document).ready(function(){b.appendTo(a.get("rootElement")||"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
enter:function(a){ | |
var b=get(this,"view"), | |
c=function(){b.appendTo(a.get("rootElement")||"body")}; | |
b&&(Ember.$.isReady===YES?c():Ember.$(document).ready(function(){c()}))}, |
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
<script type="text/x-handlebars" id="handlebars-template" data-template-name="ball_area"> | |
{{#each Demo.balls}} | |
<div class="ball-view"> | |
<div class="ball" {{bindAttr style="style"}}> | |
{{content}} | |
</div> | |
</div> | |
{{/each}} | |
</script> |
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
prepare: function() { | |
var i; | |
var balls = []; | |
for (i=0; i < 100; i++) { | |
balls.push(new Demo.Ball({ number:i })); | |
} | |
this.set('balls', balls); | |
Demo.BallAreaView.create().appendTo('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
var count = this.get('count') + 1; | |
this.set('count', count); |
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
var count = this.incrementProperty('count'); |