User interface for ember command
Sets up a new project.
$ ember init <project>Would generate:
| foo: Em.Route.extend({ | |
| route: '/foo', | |
| bar: Em.Route.extend({ | |
| route: '/:bar' | |
| }) | |
| }) | |
| foo: Em.Route.extend({ | |
| route: '/foo', |
| -define(proplist_to_record(RecordName, Proplist), | |
| lists:map( | |
| fun ({K, V}) -> | |
| {K, proplists:get_value(K, Proplist, V)} | |
| end, | |
| lists:zip( | |
| record_info(fields, RecordName), | |
| tl(tuple_to_list(#RecordName{})) | |
| ) |
| (function() { | |
| window.DS = Ember.Namespace.create({ | |
| CURRENT_API_REVISION: 4 | |
| }); | |
| })(); | |
| (function() { |
| (function() { | |
| window.DS = Ember.Namespace.create({ | |
| CURRENT_API_REVISION: 5 | |
| }); | |
| })(); | |
| (function() { |
| // lib/handlebars/base.js | |
| /*jshint eqnull:true*/ | |
| this.Handlebars = {}; | |
| (function(Handlebars) { | |
| Handlebars.VERSION = "1.0.rc.1"; | |
| Handlebars.helpers = {}; |
| // [name, before, after] | |
| var injections = [['b', 'c', null], ['a','b', null], ['d', null, 'c'], ['c', null, null], ['e', null, 'd']]; | |
| // Sort injections such that: | |
| // 1) a is before b | |
| // 2) b is before c | |
| // 3) d is after c | |
| // 4) e is after d |
| ; [name before after] | |
| (def unsorted-injections [['b 'c nil] ['a 'b nil] ['d nil 'c] ['c nil nil] ['e nil 'd]]) | |
| ; Sort unsorted-injections such that: | |
| ; 1) a is before b | |
| ; 2) b is before c | |
| ; 3) d is after c | |
| ; 4) e is after d |
| SC.Binding.lt = function (max) { | |
| return this.transform(function (value, binding) { | |
| return SC.typeOf(value) === SC.T_NUMBER && value < max; | |
| }); | |
| }; | |
| SC.Binding.gt = function (min) { | |
| return this.transform(function (value, binding) { | |
| return SC.typeOf(value) === SC.T_NUMBER && value > min; | |
| }); |