Commit 779ab09b authored by Miguel Camba's avatar Miguel Camba Committed by Addy Osmani

Update to Ember 2.10 and use HashLocation (#1722)

parent 0a0af214
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
"examples/binding-scala/js/*.js", "examples/binding-scala/js/*.js",
"examples/duel/www/**", "examples/duel/www/**",
"examples/duel/src/main/webapp/js/lib/**", "examples/duel/src/main/webapp/js/lib/**",
"examples/ember-cli/todomvc/dist/**/*.js", "examples/emberjs/todomvc/dist/**/*.js",
"examples/ember-cli/todomvc/testem.js", "examples/emberjs/todomvc/testem.js",
"examples/ember-cli/assets/**/*.js", "examples/emberjs/assets/**/*.js",
"examples/elm/build/elm.js", "examples/elm/build/elm.js",
"examples/elm/elm-stuff/**", "examples/elm/elm-stuff/**",
"examples/humble/js/**", "examples/humble/js/**",
......
...@@ -13,22 +13,8 @@ insert_final_newline = true ...@@ -13,22 +13,8 @@ insert_final_newline = true
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
[*.js]
indent_style = space
indent_size = 2
[*.hbs] [*.hbs]
insert_final_newline = false insert_final_newline = false
indent_style = space
indent_size = 2
[*.css]
indent_style = space
indent_size = 2
[*.html]
indent_style = space
indent_size = 2
[*.{diff,md}] [*.{diff,md}]
trim_trailing_whitespace = false trim_trailing_whitespace = false
# See http://help.github.com/ignore-files/ for more about ignoring files. # See https://help.github.com/ignore-files/ for more about ignoring files.
# compiled output # compiled output
# /dist # /dist
...@@ -13,5 +13,5 @@ ...@@ -13,5 +13,5 @@
/connect.lock /connect.lock
/coverage/* /coverage/*
/libpeerconnection.log /libpeerconnection.log
npm-debug.log npm-debug.log*
testem.log testem.log
...@@ -27,6 +27,6 @@ ...@@ -27,6 +27,6 @@
"strict": false, "strict": false,
"white": false, "white": false,
"eqnull": true, "eqnull": true,
"esnext": true, "esversion": 6,
"unused": true "unused": true
} }
...@@ -7,12 +7,15 @@ sudo: false ...@@ -7,12 +7,15 @@ sudo: false
cache: cache:
directories: directories:
- node_modules - $HOME/.npm
- $HOME/.cache # includes bowers cache
before_install: before_install:
- npm config set spin false - npm config set spin false
- npm install -g bower - npm install -g bower
- bower --version
- npm install phantomjs-prebuilt - npm install phantomjs-prebuilt
- node_modules/phantomjs-prebuilt/bin/phantomjs --version
install: install:
- npm install - npm install
......
...@@ -6,19 +6,19 @@ ...@@ -6,19 +6,19 @@
<title>Todomvc</title> <title>Todomvc</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/examples/ember-cli/index.html" />
{{content-for "head"}} {{content-for "head"}}
<link rel="stylesheet" href="assets/vendor.css"> <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="assets/todomvc.css"> <link rel="stylesheet" href="{{rootURL}}assets/todomvc.css">
{{content-for "head-footer"}} {{content-for "head-footer"}}
</head> </head>
<body> <body>
{{content-for "body"}} {{content-for "body"}}
<script src="assets/vendor.js"></script> <script src="{{rootURL}}assets/vendor.js"></script>
<script src="assets/todomvc.js"></script> <script src="{{rootURL}}assets/todomvc.js"></script>
{{content-for "body-footer"}} {{content-for "body-footer"}}
</body> </body>
......
...@@ -2,7 +2,8 @@ import Ember from 'ember'; ...@@ -2,7 +2,8 @@ import Ember from 'ember';
import config from './config/environment'; import config from './config/environment';
const Router = Ember.Router.extend({ const Router = Ember.Router.extend({
location: config.locationType location: config.locationType,
rootURL: config.rootURL
}); });
Router.map(function () { Router.map(function () {
......
{ {
"name": "todomvc", "name": "todomvc",
"dependencies": { "dependencies": {
"ember": "~2.6.0", "ember": "~2.10.0",
"ember-cli-shims": "0.1.1", "ember-cli-shims": "0.1.3"
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
} }
} }
...@@ -5,11 +5,15 @@ module.exports = function (environment) { ...@@ -5,11 +5,15 @@ module.exports = function (environment) {
modulePrefix: 'todomvc', modulePrefix: 'todomvc',
environment: environment, environment: environment,
baseURL: null, baseURL: null,
locationType: 'auto', locationType: 'hash',
EmberENV: { EmberENV: {
FEATURES: { FEATURES: {
// Here you can enable experimental features on an ember canary build // Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true // e.g. 'with-controller': true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false
} }
}, },
...@@ -29,7 +33,7 @@ module.exports = function (environment) { ...@@ -29,7 +33,7 @@ module.exports = function (environment) {
if (environment === 'test') { if (environment === 'test') {
// Testem prefers this... // Testem prefers this...
ENV.baseURL = '/'; ENV.rootURL = '/';
ENV.locationType = 'none'; ENV.locationType = 'none';
// keep test console output quieter // keep test console output quieter
......
"use strict";define("todomvc/app",["exports","ember","todomvc/resolver","ember-load-initializers","todomvc/config/environment"],function(e,t,n,r,a){var o=void 0;t["default"].MODEL_FACTORY_INJECTIONS=!0,o=t["default"].Application.extend({modulePrefix:a["default"].modulePrefix,podModulePrefix:a["default"].podModulePrefix,Resolver:n["default"]}),(0,r["default"])(o,a["default"].modulePrefix),e["default"]=o}),define("todomvc/components/app-version",["exports","ember-cli-app-version/components/app-version","todomvc/config/environment"],function(e,t,n){var r=n["default"].APP.name,a=n["default"].APP.version;e["default"]=t["default"].extend({version:a,name:r})}),define("todomvc/components/todo-item",["exports","ember"],function(e,t){e["default"]=t["default"].Component.extend({repo:t["default"].inject.service(),tagName:"li",editing:!1,classNameBindings:["todo.completed","editing"],actions:{startEditing:function(){this.get("onStartEdit")(),this.set("editing",!0),t["default"].run.scheduleOnce("afterRender",this,"focusInput")},doneEditing:function(e){this.get("editing")&&(t["default"].isBlank(e)?this.send("removeTodo"):(this.set("todo.title",e.trim()),this.set("editing",!1),this.get("onEndEdit")()))},handleKeydown:function(e){13===e.keyCode?e.target.blur():27===e.keyCode&&this.set("editing",!1)},toggleCompleted:function(e){var n=this.get("todo");t["default"].set(n,"completed",e.target.checked),this.get("repo").persist()},removeTodo:function(){this.get("repo")["delete"](this.get("todo"))}},focusInput:function(){this.element.querySelector("input.edit").focus()}})}),define("todomvc/components/todo-list",["exports","ember"],function(e,t){e["default"]=t["default"].Component.extend({repo:t["default"].inject.service(),tagName:"section",elementId:"main",canToggle:!0,allCompleted:t["default"].computed("todos.@each.completed",function(){return this.get("todos").isEvery("completed")}),actions:{enableToggle:function(){this.set("canToggle",!0)},disableToggle:function(){this.set("canToggle",!1)},toggleAll:function(){var e=this.get("allCompleted");this.get("todos").forEach(function(n){return t["default"].set(n,"completed",!e)}),this.get("repo").persist()}}})}),define("todomvc/controllers/active",["exports","ember"],function(e,t){e["default"]=t["default"].Controller.extend({todos:t["default"].computed.filterBy("model","completed",!1)})}),define("todomvc/controllers/application",["exports","ember"],function(e,t){e["default"]=t["default"].Controller.extend({repo:t["default"].inject.service(),remaining:t["default"].computed.filterBy("model","completed",!1),completed:t["default"].computed.filterBy("model","completed"),actions:{createTodo:function(e){13!==e.keyCode||t["default"].isBlank(e.target.value)||(this.get("repo").add({title:e.target.value.trim(),completed:!1}),e.target.value="")},clearCompleted:function(){this.get("model").removeObjects(this.get("completed")),this.get("repo").persist()}}})}),define("todomvc/controllers/completed",["exports","ember"],function(e,t){e["default"]=t["default"].Controller.extend({todos:t["default"].computed.filterBy("model","completed",!0)})}),define("todomvc/helpers/gt",["exports","ember"],function(e,t){function n(e){var t=r(e,2),n=t[0],a=t[1];return n>a}var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(d){a=!0,o=d}finally{try{!r&&i["return"]&&i["return"]()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.gt=n,e["default"]=t["default"].Helper.helper(n)}),define("todomvc/helpers/pluralize",["exports","ember","ember-inflector"],function(e,t,n){function r(e){var t=a(e,2),r=t[0],o=t[1];return 1===o?r:(0,n.pluralize)(r)}var a=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(d){a=!0,o=d}finally{try{!r&&i["return"]&&i["return"]()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.pluralizeHelper=r,e["default"]=t["default"].Helper.helper(r)}),define("todomvc/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){e["default"]=t["default"]}),define("todomvc/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","todomvc/config/environment"],function(e,t,n){e["default"]={name:"App Version",initialize:(0,t["default"])(n["default"].APP.name,n["default"].APP.version)}}),define("todomvc/initializers/container-debug-adapter",["exports","ember-resolver/container-debug-adapter"],function(e,t){e["default"]={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0];e.register("container-debug-adapter:main",t["default"]),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("todomvc/initializers/export-application-global",["exports","ember","todomvc/config/environment"],function(e,t,n){function r(){var e=arguments[1]||arguments[0];if(n["default"].exportApplicationGlobal!==!1){var r,a=n["default"].exportApplicationGlobal;r="string"==typeof a?a:t["default"].String.classify(n["default"].modulePrefix),window[r]||(window[r]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete window[r]}}))}}e.initialize=r,e["default"]={name:"export-application-global",initialize:r}}),define("todomvc/resolver",["exports","ember-resolver"],function(e,t){e["default"]=t["default"]}),define("todomvc/router",["exports","ember","todomvc/config/environment"],function(e,t,n){var r=t["default"].Router.extend({location:n["default"].locationType});r.map(function(){this.route("active"),this.route("completed")}),e["default"]=r}),define("todomvc/routes/application",["exports","ember"],function(e,t){e["default"]=t["default"].Route.extend({repo:t["default"].inject.service(),model:function(){return this.get("repo").findAll()}})}),define("todomvc/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t["default"]}})}),define("todomvc/services/repo",["exports","ember"],function(e,t){e["default"]=t["default"].Service.extend({lastId:0,data:null,findAll:function(){return this.get("data")||this.set("data",JSON.parse(window.localStorage.getItem("todos")||"[]"))},add:function(e){var t=Object.assign({id:this.incrementProperty("lastId")},e);return this.get("data").pushObject(t),this.persist(),t},"delete":function(e){this.get("data").removeObject(e),this.persist()},persist:function(){window.localStorage.setItem("todos",JSON.stringify(this.get("data")))}})}),define("todomvc/templates/active",["exports"],function(e){e["default"]=Ember.HTMLBars.template(function(){return{meta:{fragmentReason:{name:"missing-wrapper",problems:["wrong-type"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:1,column:25}},moduleName:"todomvc/templates/active.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createComment("");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(1);return r[0]=e.createMorphAt(t,0,0,n),e.insertBoundary(t,0),e.insertBoundary(t,null),r},statements:[["inline","todo-list",[],["todos",["subexpr","@mut",[["get","todos",["loc",[null,[1,18],[1,23]]]]],[],[]]],["loc",[null,[1,0],[1,25]]]]],locals:[],templates:[]}}())}),define("todomvc/templates/application",["exports"],function(e){e["default"]=Ember.HTMLBars.template(function(){var e=function(){var e=function(){return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:11,column:14},end:{line:11,column:60}},moduleName:"todomvc/templates/application.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode("All");return e.appendChild(t,n),t},buildRenderNodes:function(){return[]},statements:[],locals:[],templates:[]}}(),t=function(){return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:12,column:14},end:{line:12,column:64}},moduleName:"todomvc/templates/application.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode("Active");return e.appendChild(t,n),t},buildRenderNodes:function(){return[]},statements:[],locals:[],templates:[]}}(),n=function(){return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:13,column:14},end:{line:13,column:70}},moduleName:"todomvc/templates/application.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode("Completed");return e.appendChild(t,n),t},buildRenderNodes:function(){return[]},statements:[],locals:[],templates:[]}}(),r=function(){return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:15,column:8},end:{line:17,column:8}},moduleName:"todomvc/templates/application.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode(" ");e.appendChild(t,n);var n=e.createElement("button");e.setAttribute(n,"id","clear-completed");var r=e.createTextNode("Clear completed");e.appendChild(n,r),e.appendChild(t,n);var n=e.createTextNode("\n");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=e.childAt(t,[1]),a=new Array(1);return a[0]=e.createAttrMorph(r,"onclick"),a},statements:[["attribute","onclick",["subexpr","action",["clearCompleted"],[],["loc",[null,[16,47],[16,74]]]]]],locals:[],templates:[]}}();return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:7,column:4},end:{line:19,column:4}},moduleName:"todomvc/templates/application.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode(" ");e.appendChild(t,n);var n=e.createElement("footer");e.setAttribute(n,"id","footer");var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("span");e.setAttribute(r,"id","todo-count");var a=e.createElement("strong"),o=e.createComment("");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode(" ");e.appendChild(r,a);var a=e.createComment("");e.appendChild(r,a);var a=e.createTextNode(" left");e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("ul");e.setAttribute(r,"id","filters");var a=e.createTextNode("\n ");e.appendChild(r,a);var a=e.createElement("li"),o=e.createComment("");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode("\n ");e.appendChild(r,a);var a=e.createElement("li"),o=e.createComment("");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode("\n ");e.appendChild(r,a);var a=e.createElement("li"),o=e.createComment("");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode("\n ");e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n");e.appendChild(n,r);var r=e.createComment("");e.appendChild(n,r);var r=e.createTextNode(" ");e.appendChild(n,r),e.appendChild(t,n);var n=e.createTextNode("\n");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=e.childAt(t,[1]),a=e.childAt(r,[1]),o=e.childAt(r,[3]),l=new Array(6);return l[0]=e.createMorphAt(e.childAt(a,[0]),0,0),l[1]=e.createMorphAt(a,2,2),l[2]=e.createMorphAt(e.childAt(o,[1]),0,0),l[3]=e.createMorphAt(e.childAt(o,[3]),0,0),l[4]=e.createMorphAt(e.childAt(o,[5]),0,0),l[5]=e.createMorphAt(r,5,5),l},statements:[["content","remaining.length",["loc",[null,[9,38],[9,58]]]],["inline","pluralize",["item",["get","remaining.length",["loc",[null,[9,87],[9,103]]]]],[],["loc",[null,[9,68],[9,105]]]],["block","link-to",["index"],["activeClass","selected"],0,null,["loc",[null,[11,14],[11,72]]]],["block","link-to",["active"],["activeClass","selected"],1,null,["loc",[null,[12,14],[12,76]]]],["block","link-to",["completed"],["activeClass","selected"],2,null,["loc",[null,[13,14],[13,82]]]],["block","if",[["get","completed.length",["loc",[null,[15,14],[15,30]]]]],[],3,null,["loc",[null,[15,8],[17,15]]]]],locals:[],templates:[e,t,n,r]}}();return{meta:{fragmentReason:{name:"missing-wrapper",problems:["multiple-nodes"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:29,column:9}},moduleName:"todomvc/templates/application.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createElement("section");e.setAttribute(n,"id","todoapp");var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("header");e.setAttribute(r,"id","header");var a=e.createTextNode("\n ");e.appendChild(r,a);var a=e.createElement("h1"),o=e.createTextNode("todos");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode("\n ");e.appendChild(r,a);var a=e.createElement("input");e.setAttribute(a,"type","text"),e.setAttribute(a,"id","new-todo"),e.setAttribute(a,"placeholder","What needs to be done?"),e.setAttribute(a,"autofocus",""),e.appendChild(r,a);var a=e.createTextNode("\n ");e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createComment("");e.appendChild(n,r);var r=e.createTextNode("\n");e.appendChild(n,r);var r=e.createComment("");e.appendChild(n,r),e.appendChild(t,n);var n=e.createTextNode("\n");e.appendChild(t,n);var n=e.createElement("footer");e.setAttribute(n,"id","info");var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("p"),a=e.createTextNode("Double-click to edit a todo");e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("p"),a=e.createTextNode("\n Created by\n ");e.appendChild(r,a);var a=e.createElement("a");e.setAttribute(a,"href","http://github.com/cibernox");var o=e.createTextNode("Miguel Camba");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode(",\n ");e.appendChild(r,a);var a=e.createElement("a");e.setAttribute(a,"href","http://github.com/addyosmani");var o=e.createTextNode("Addy Osmani");e.appendChild(a,o),e.appendChild(r,a);var a=e.createTextNode("\n ");e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("p"),a=e.createTextNode("Part of ");e.appendChild(r,a);var a=e.createElement("a");e.setAttribute(a,"href","http://todomvc.com");var o=e.createTextNode("TodoMVC");e.appendChild(a,o),e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n");return e.appendChild(n,r),e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=e.childAt(t,[0]),a=e.childAt(r,[1,3]),o=new Array(3);return o[0]=e.createAttrMorph(a,"onkeydown"),o[1]=e.createMorphAt(r,3,3),o[2]=e.createMorphAt(r,5,5),o},statements:[["attribute","onkeydown",["subexpr","action",["createTodo"],[],["loc",[null,[4,47],[4,70]]]]],["content","outlet",["loc",[null,[6,4],[6,14]]]],["block","if",[["subexpr","gt",[["get","model.length",["loc",[null,[7,14],[7,26]]]],0],[],["loc",[null,[7,10],[7,29]]]]],[],0,null,["loc",[null,[7,4],[19,11]]]]],locals:[],templates:[e]}}())}),define("todomvc/templates/completed",["exports"],function(e){e["default"]=Ember.HTMLBars.template(function(){return{meta:{fragmentReason:{name:"missing-wrapper",problems:["wrong-type"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:1,column:25}},moduleName:"todomvc/templates/completed.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createComment("");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(1);return r[0]=e.createMorphAt(t,0,0,n),e.insertBoundary(t,0),e.insertBoundary(t,null),r},statements:[["inline","todo-list",[],["todos",["subexpr","@mut",[["get","todos",["loc",[null,[1,18],[1,23]]]]],[],[]]],["loc",[null,[1,0],[1,25]]]]],locals:[],templates:[]}}())}),define("todomvc/templates/components/todo-item",["exports"],function(e){e["default"]=Ember.HTMLBars.template(function(){return{meta:{fragmentReason:{name:"missing-wrapper",problems:["multiple-nodes"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:6,column:153}},moduleName:"todomvc/templates/components/todo-item.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createElement("div");e.setAttribute(n,"class","view");var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("input");e.setAttribute(r,"type","checkbox"),e.setAttribute(r,"class","toggle"),e.appendChild(n,r);var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("label"),a=e.createComment("");e.appendChild(r,a),e.appendChild(n,r);var r=e.createTextNode("\n ");e.appendChild(n,r);var r=e.createElement("button");e.setAttribute(r,"class","destroy"),e.appendChild(n,r);var r=e.createTextNode("\n");e.appendChild(n,r),e.appendChild(t,n);var n=e.createTextNode("\n");e.appendChild(t,n);var n=e.createElement("input");return e.setAttribute(n,"type","text"),e.setAttribute(n,"class","edit"),e.setAttribute(n,"autofocus",""),e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=e.childAt(t,[0]),a=e.childAt(r,[1]);this.cachedFragment&&e.repairClonedNode(a,[],!0);var o=e.childAt(r,[3]),l=e.childAt(r,[5]),i=e.childAt(t,[2]),d=new Array(8);return d[0]=e.createAttrMorph(a,"checked"),d[1]=e.createAttrMorph(a,"onchange"),d[2]=e.createAttrMorph(o,"ondblclick"),d[3]=e.createMorphAt(o,0,0),d[4]=e.createAttrMorph(l,"onclick"),d[5]=e.createAttrMorph(i,"value"),d[6]=e.createAttrMorph(i,"onblur"),d[7]=e.createAttrMorph(i,"onkeydown"),d},statements:[["attribute","checked",["get","todo.completed",["loc",[null,[2,50],[2,64]]]]],["attribute","onchange",["subexpr","action",["toggleCompleted"],[],["loc",[null,[2,76],[2,104]]]]],["attribute","ondblclick",["subexpr","action",["startEditing"],[],["loc",[null,[3,20],[3,45]]]]],["content","todo.title",["loc",[null,[3,46],[3,60]]]],["attribute","onclick",["subexpr","action",["removeTodo"],[],["loc",[null,[4,18],[4,41]]]]],["attribute","value",["get","todo.title",["loc",[null,[6,40],[6,50]]]]],["attribute","onblur",["subexpr","action",["doneEditing"],["value","target.value"],["loc",[null,[6,60],[6,105]]]]],["attribute","onkeydown",["subexpr","action",["handleKeydown"],[],["loc",[null,[6,116],[6,142]]]]]],locals:[],templates:[]}}())}),define("todomvc/templates/components/todo-list",["exports"],function(e){e["default"]=Ember.HTMLBars.template(function(){var e=function(){var e=function(){return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:2,column:2},end:{line:4,column:2}},moduleName:"todomvc/templates/components/todo-list.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode(" ");e.appendChild(t,n);var n=e.createElement("input");e.setAttribute(n,"type","checkbox"),e.setAttribute(n,"id","toggle-all"),e.appendChild(t,n);var n=e.createTextNode("\n");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=e.childAt(t,[1]);this.cachedFragment&&e.repairClonedNode(r,[],!0);var a=new Array(2);return a[0]=e.createAttrMorph(r,"checked"),a[1]=e.createAttrMorph(r,"onchange"),a},statements:[["attribute","checked",["get","allCompleted",["loc",[null,[3,53],[3,65]]]]],["attribute","onchange",["subexpr","action",["toggleAll"],[],["loc",[null,[3,77],[3,99]]]]]],locals:[],templates:[]}}(),t=function(){return{meta:{fragmentReason:!1,revision:"Ember@2.6.0",loc:{source:null,start:{line:6,column:4},end:{line:8,column:4}},moduleName:"todomvc/templates/components/todo-list.hbs"},isEmpty:!1,arity:1,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode(" ");e.appendChild(t,n);var n=e.createComment("");e.appendChild(t,n);var n=e.createTextNode("\n");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(1);return r[0]=e.createMorphAt(t,1,1,n),r},statements:[["inline","todo-item",[],["todo",["subexpr","@mut",[["get","todo",["loc",[null,[7,23],[7,27]]]]],[],[]],"onStartEdit",["subexpr","action",["disableToggle"],[],["loc",[null,[7,40],[7,64]]]],"onEndEdit",["subexpr","action",["enableToggle"],[],["loc",[null,[7,75],[7,98]]]]],["loc",[null,[7,6],[7,100]]]]],locals:["todo"],templates:[]}}();return{meta:{fragmentReason:{name:"missing-wrapper",problems:["wrong-type","multiple-nodes"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:10,column:0}},moduleName:"todomvc/templates/components/todo-list.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createComment("");e.appendChild(t,n);var n=e.createTextNode(" ");e.appendChild(t,n);var n=e.createElement("ul");e.setAttribute(n,"id","todo-list"),e.setAttribute(n,"class","todo-list");var r=e.createTextNode("\n");e.appendChild(n,r);var r=e.createComment("");e.appendChild(n,r);var r=e.createTextNode(" ");e.appendChild(n,r),e.appendChild(t,n);var n=e.createTextNode("\n");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(2);return r[0]=e.createMorphAt(t,0,0,n),r[1]=e.createMorphAt(e.childAt(t,[2]),1,1),e.insertBoundary(t,0),r},statements:[["block","if",[["get","canToggle",["loc",[null,[2,8],[2,17]]]]],[],0,null,["loc",[null,[2,2],[4,9]]]],["block","each",[["get","todos",["loc",[null,[6,12],[6,17]]]]],[],1,null,["loc",[null,[6,4],[8,13]]]]],locals:[],templates:[e,t]}}();return{meta:{fragmentReason:{name:"missing-wrapper",problems:["wrong-type"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:11,column:0}},moduleName:"todomvc/templates/components/todo-list.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createComment("");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(1);return r[0]=e.createMorphAt(t,0,0,n),e.insertBoundary(t,0),e.insertBoundary(t,null),r},statements:[["block","if",[["get","todos.length",["loc",[null,[1,6],[1,18]]]]],[],0,null,["loc",[null,[1,0],[10,7]]]]],locals:[],templates:[e]}}())}),define("todomvc/templates/index",["exports"],function(e){e["default"]=Ember.HTMLBars.template(function(){var e=function(){return{meta:{fragmentReason:{name:"missing-wrapper",problems:["wrong-type"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:3,column:0}},moduleName:"todomvc/templates/index.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createTextNode(" ");e.appendChild(t,n);var n=e.createComment("");e.appendChild(t,n);var n=e.createTextNode("\n");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(1);return r[0]=e.createMorphAt(t,1,1,n),r},statements:[["inline","todo-list",[],["todos",["subexpr","@mut",[["get","model",["loc",[null,[2,20],[2,25]]]]],[],[]]],["loc",[null,[2,2],[2,27]]]]],locals:[],templates:[]}}();return{meta:{fragmentReason:{name:"missing-wrapper",problems:["wrong-type"]},revision:"Ember@2.6.0",loc:{source:null,start:{line:1,column:0},end:{line:4,column:0}},moduleName:"todomvc/templates/index.hbs"},isEmpty:!1,arity:0,cachedFragment:null,hasRendered:!1,buildFragment:function(e){var t=e.createDocumentFragment(),n=e.createComment("");return e.appendChild(t,n),t},buildRenderNodes:function(e,t,n){var r=new Array(1);return r[0]=e.createMorphAt(t,0,0,n),e.insertBoundary(t,0),e.insertBoundary(t,null),r},statements:[["block","if",[["get","model.length",["loc",[null,[1,6],[1,18]]]]],[],0,null,["loc",[null,[1,0],[3,7]]]]],locals:[],templates:[e]}}())}),define("todomvc/config/environment",["ember"],function(e){var t="todomvc";try{var n=t+"/config/environment",r=e["default"].$('meta[name="'+n+'"]').attr("content"),a=JSON.parse(unescape(r));return{"default":a}}catch(o){throw new Error('Could not read config from meta tag with name "'+n+'".')}}),runningTests||require("todomvc/app")["default"].create({name:"todomvc",version:"0.0.0+b72d5e59"});
\ No newline at end of file
"use strict";define("todomvc/app",["exports","ember","todomvc/resolver","ember-load-initializers","todomvc/config/environment"],function(e,t,l,n,o){var a=void 0;t.default.MODEL_FACTORY_INJECTIONS=!0,a=t.default.Application.extend({modulePrefix:o.default.modulePrefix,podModulePrefix:o.default.podModulePrefix,Resolver:l.default}),(0,n.default)(a,o.default.modulePrefix),e.default=a}),define("todomvc/components/todo-item",["exports","ember"],function(e,t){e.default=t.default.Component.extend({repo:t.default.inject.service(),tagName:"li",editing:!1,classNameBindings:["todo.completed","editing"],actions:{startEditing:function(){this.get("onStartEdit")(),this.set("editing",!0),t.default.run.scheduleOnce("afterRender",this,"focusInput")},doneEditing:function(e){this.get("editing")&&(t.default.isBlank(e)?this.send("removeTodo"):(this.set("todo.title",e.trim()),this.set("editing",!1),this.get("onEndEdit")()))},handleKeydown:function(e){13===e.keyCode?e.target.blur():27===e.keyCode&&this.set("editing",!1)},toggleCompleted:function(e){var l=this.get("todo");t.default.set(l,"completed",e.target.checked),this.get("repo").persist()},removeTodo:function(){this.get("repo").delete(this.get("todo"))}},focusInput:function(){this.element.querySelector("input.edit").focus()}})}),define("todomvc/components/todo-list",["exports","ember"],function(e,t){e.default=t.default.Component.extend({repo:t.default.inject.service(),tagName:"section",elementId:"main",canToggle:!0,allCompleted:t.default.computed("todos.@each.completed",function(){return this.get("todos").isEvery("completed")}),actions:{enableToggle:function(){this.set("canToggle",!0)},disableToggle:function(){this.set("canToggle",!1)},toggleAll:function(){var e=this.get("allCompleted");this.get("todos").forEach(function(l){return t.default.set(l,"completed",!e)}),this.get("repo").persist()}}})}),define("todomvc/controllers/active",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({todos:t.default.computed.filterBy("model","completed",!1)})}),define("todomvc/controllers/application",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({repo:t.default.inject.service(),remaining:t.default.computed.filterBy("model","completed",!1),completed:t.default.computed.filterBy("model","completed"),actions:{createTodo:function(e){13!==e.keyCode||t.default.isBlank(e.target.value)||(this.get("repo").add({title:e.target.value.trim(),completed:!1}),e.target.value="")},clearCompleted:function(){this.get("model").removeObjects(this.get("completed")),this.get("repo").persist()}}})}),define("todomvc/controllers/completed",["exports","ember"],function(e,t){e.default=t.default.Controller.extend({todos:t.default.computed.filterBy("model","completed",!0)})}),define("todomvc/helpers/app-version",["exports","ember","todomvc/config/environment"],function(e,t,l){function n(){return o}e.appVersion=n;var o=l.default.APP.version;e.default=t.default.Helper.helper(n)}),define("todomvc/helpers/gt",["exports","ember"],function(e,t){function l(e){var t=n(e,2),l=t[0],o=t[1];return l>o}var n=function(){function e(e,t){var l=[],n=!0,o=!1,a=void 0;try{for(var i,r=e[Symbol.iterator]();!(n=(i=r.next()).done)&&(l.push(i.value),!t||l.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&r.return&&r.return()}finally{if(o)throw a}}return l}return function(t,l){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.gt=l,e.default=t.default.Helper.helper(l)}),define("todomvc/helpers/pluralize",["exports","ember","ember-inflector"],function(e,t,l){function n(e){var t=o(e,2),n=t[0],a=t[1];return 1===a?n:(0,l.pluralize)(n)}var o=function(){function e(e,t){var l=[],n=!0,o=!1,a=void 0;try{for(var i,r=e[Symbol.iterator]();!(n=(i=r.next()).done)&&(l.push(i.value),!t||l.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&r.return&&r.return()}finally{if(o)throw a}}return l}return function(t,l){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.pluralizeHelper=n,e.default=t.default.Helper.helper(n)}),define("todomvc/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){e.default=t.default}),define("todomvc/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","todomvc/config/environment"],function(e,t,l){var n=l.default.APP,o=n.name,a=n.version;e.default={name:"App Version",initialize:(0,t.default)(o,a)}}),define("todomvc/initializers/container-debug-adapter",["exports","ember-resolver/container-debug-adapter"],function(e,t){e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0];e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("todomvc/initializers/export-application-global",["exports","ember","todomvc/config/environment"],function(e,t,l){function n(){var e=arguments[1]||arguments[0];if(l.default.exportApplicationGlobal!==!1){var n;if("undefined"!=typeof window)n=window;else if("undefined"!=typeof global)n=global;else{if("undefined"==typeof self)return;n=self}var o,a=l.default.exportApplicationGlobal;o="string"==typeof a?a:t.default.String.classify(l.default.modulePrefix),n[o]||(n[o]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[o]}}))}}e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("todomvc/resolver",["exports","ember-resolver"],function(e,t){e.default=t.default}),define("todomvc/router",["exports","ember","todomvc/config/environment"],function(e,t,l){var n=t.default.Router.extend({location:l.default.locationType,rootURL:l.default.rootURL});n.map(function(){this.route("active"),this.route("completed")}),e.default=n}),define("todomvc/routes/application",["exports","ember"],function(e,t){e.default=t.default.Route.extend({repo:t.default.inject.service(),model:function(){return this.get("repo").findAll()}})}),define("todomvc/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("todomvc/services/repo",["exports","ember"],function(e,t){e.default=t.default.Service.extend({lastId:0,data:null,findAll:function(){return this.get("data")||this.set("data",JSON.parse(window.localStorage.getItem("todos")||"[]"))},add:function(e){var t=Object.assign({id:this.incrementProperty("lastId")},e);return this.get("data").pushObject(t),this.persist(),t},delete:function(e){this.get("data").removeObject(e),this.persist()},persist:function(){window.localStorage.setItem("todos",JSON.stringify(this.get("data")))}})}),define("todomvc/templates/active",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"8O3lZSvu",block:'{"statements":[["append",["helper",["todo-list"],null,[["todos"],[["get",["todos"]]]]],false]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/active.hbs"}})}),define("todomvc/templates/application",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"QNmHycYw",block:'{"statements":[["open-element","section",[]],["static-attr","id","todoapp"],["flush-element"],["text","\\n "],["open-element","header",[]],["static-attr","id","header"],["flush-element"],["text","\\n "],["open-element","h1",[]],["flush-element"],["text","todos"],["close-element"],["text","\\n "],["open-element","input",[]],["static-attr","type","text"],["static-attr","id","new-todo"],["dynamic-attr","onkeydown",["helper",["action"],[["get",[null]],"createTodo"],null],null],["static-attr","placeholder","What needs to be done?"],["static-attr","autofocus",""],["flush-element"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["append",["unknown",["outlet"]],false],["text","\\n"],["block",["if"],[["helper",["gt"],[["get",["model","length"]],0],null]],null,4],["close-element"],["text","\\n"],["open-element","footer",[]],["static-attr","id","info"],["flush-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["text","Double-click to edit a todo"],["close-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["text","\\n Created by\\n "],["open-element","a",[]],["static-attr","href","http://github.com/cibernox"],["flush-element"],["text","Miguel Camba"],["close-element"],["text",",\\n "],["open-element","a",[]],["static-attr","href","http://github.com/addyosmani"],["flush-element"],["text","Addy Osmani"],["close-element"],["text","\\n "],["close-element"],["text","\\n "],["open-element","p",[]],["flush-element"],["text","Part of "],["open-element","a",[]],["static-attr","href","http://todomvc.com"],["flush-element"],["text","TodoMVC"],["close-element"],["close-element"],["text","\\n"],["close-element"]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["open-element","button",[]],["static-attr","id","clear-completed"],["dynamic-attr","onclick",["helper",["action"],[["get",[null]],"clearCompleted"],null],null],["flush-element"],["text","Clear completed"],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["text","Completed"]],"locals":[]},{"statements":[["text","Active"]],"locals":[]},{"statements":[["text","All"]],"locals":[]},{"statements":[["text"," "],["open-element","footer",[]],["static-attr","id","footer"],["flush-element"],["text","\\n "],["open-element","span",[]],["static-attr","id","todo-count"],["flush-element"],["open-element","strong",[]],["flush-element"],["append",["unknown",["remaining","length"]],false],["close-element"],["text"," "],["append",["helper",["pluralize"],["item",["get",["remaining","length"]]],null],false],["text"," left"],["close-element"],["text","\\n "],["open-element","ul",[]],["static-attr","id","filters"],["flush-element"],["text","\\n "],["open-element","li",[]],["flush-element"],["block",["link-to"],["index"],[["activeClass"],["selected"]],3],["close-element"],["text","\\n "],["open-element","li",[]],["flush-element"],["block",["link-to"],["active"],[["activeClass"],["selected"]],2],["close-element"],["text","\\n "],["open-element","li",[]],["flush-element"],["block",["link-to"],["completed"],[["activeClass"],["selected"]],1],["close-element"],["text","\\n "],["close-element"],["text","\\n"],["block",["if"],[["get",["completed","length"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"todomvc/templates/application.hbs"}})}),define("todomvc/templates/completed",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"7qyGvTPX",block:'{"statements":[["append",["helper",["todo-list"],null,[["todos"],[["get",["todos"]]]]],false]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/completed.hbs"}})}),define("todomvc/templates/components/todo-item",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"uhc3ID/K",block:'{"statements":[["open-element","div",[]],["static-attr","class","view"],["flush-element"],["text","\\n "],["open-element","input",[]],["static-attr","type","checkbox"],["static-attr","class","toggle"],["dynamic-attr","checked",["unknown",["todo","completed"]],null],["dynamic-attr","onchange",["helper",["action"],[["get",[null]],"toggleCompleted"],null],null],["flush-element"],["close-element"],["text","\\n "],["open-element","label",[]],["dynamic-attr","ondblclick",["helper",["action"],[["get",[null]],"startEditing"],null],null],["flush-element"],["append",["unknown",["todo","title"]],false],["close-element"],["text","\\n "],["open-element","button",[]],["dynamic-attr","onclick",["helper",["action"],[["get",[null]],"removeTodo"],null],null],["static-attr","class","destroy"],["flush-element"],["close-element"],["text","\\n"],["close-element"],["text","\\n"],["open-element","input",[]],["static-attr","type","text"],["static-attr","class","edit"],["dynamic-attr","value",["unknown",["todo","title"]],null],["dynamic-attr","onblur",["helper",["action"],[["get",[null]],"doneEditing"],[["value"],["target.value"]]],null],["dynamic-attr","onkeydown",["helper",["action"],[["get",[null]],"handleKeydown"],null],null],["static-attr","autofocus",""],["flush-element"],["close-element"]],"locals":[],"named":[],"yields":[],"blocks":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/components/todo-item.hbs"}})}),define("todomvc/templates/components/todo-list",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"+yC2joV7",block:'{"statements":[["block",["if"],[["get",["todos","length"]]],null,2]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["todo-item"],null,[["todo","onStartEdit","onEndEdit"],[["get",["todo"]],["helper",["action"],[["get",[null]],"disableToggle"],null],["helper",["action"],[["get",[null]],"enableToggle"],null]]]],false],["text","\\n"]],"locals":["todo"]},{"statements":[["text"," "],["open-element","input",[]],["static-attr","type","checkbox"],["static-attr","id","toggle-all"],["dynamic-attr","checked",["unknown",["allCompleted"]],null],["dynamic-attr","onchange",["helper",["action"],[["get",[null]],"toggleAll"],null],null],["flush-element"],["close-element"],["text","\\n"]],"locals":[]},{"statements":[["block",["if"],[["get",["canToggle"]]],null,1],["text"," "],["open-element","ul",[]],["static-attr","id","todo-list"],["static-attr","class","todo-list"],["flush-element"],["text","\\n"],["block",["each"],[["get",["todos"]]],null,0],["text"," "],["close-element"],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"todomvc/templates/components/todo-list.hbs"}})}),define("todomvc/templates/index",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"StDDpEzJ",block:'{"statements":[["block",["if"],[["get",["model","length"]]],null,0]],"locals":[],"named":[],"yields":[],"blocks":[{"statements":[["text"," "],["append",["helper",["todo-list"],null,[["todos"],[["get",["model"]]]]],false],["text","\\n"]],"locals":[]}],"hasPartials":false}',meta:{moduleName:"todomvc/templates/index.hbs"}})}),define("todomvc/config/environment",["ember"],function(e){var t="todomvc";try{var l=t+"/config/environment",n=document.querySelector('meta[name="'+l+'"]').getAttribute("content"),o=JSON.parse(unescape(n)),a={default:o};return Object.defineProperty(a,"__esModule",{value:!0}),a}catch(e){throw new Error('Could not read config from meta tag with name "'+l+'".')}}),runningTests||require("todomvc/app").default.create({name:"todomvc",version:"0.0.0+47754603"});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,21 +6,21 @@ ...@@ -6,21 +6,21 @@
<title>Todomvc</title> <title>Todomvc</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/examples/emberjs/index.html" />
<meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3Anull%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+b72d5e59%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
<meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3Anull%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+47754603%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
<link rel="stylesheet" href="assets/vendor-7b5c98520910afa58d74e05ec86cd873.css">
<link rel="stylesheet" href="assets/todomvc-d41d8cd98f00b204e9800998ecf8427e.css">
<link rel="stylesheet" href="assets/vendor-7b5c98520910afa58d74e05ec86cd873.css" integrity="sha256-bsagGHduhay9QPLUFpddcZFq7Kmr2ScM3VKnWhdX8oM= sha512-eNsGN2aLecWPvoqNVH8oXK8o/IJ7rO5ti0zgS8lF8LiwmKUHdEIuFduwcDL1VLAt2r+3YjgDzoSNYK6c57pJzw==" >
<link rel="stylesheet" href="assets/todomvc-d41d8cd98f00b204e9800998ecf8427e.css" integrity="sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==" >
</head> </head>
<body> <body>
<script src="assets/vendor-22a6a947beb9d4b28a782879e18b0f65.js" integrity="sha256-M1pD1q8B9PyrHkKX/mlfsOLLHMrh/x7vvCGLRC63OyI= sha512-I4vC6+4Z29iHB4nJBCzcIjrgMtDerq7sxYLE2lM/AhjkNLp6gf2+Zpne8OtGdTLRkyvTqzPm1V7gq9w4HQxOXg==" ></script>
<script src="assets/todomvc-d191d5c1c9280b108d69413f052d3bb4.js" integrity="sha256-1wUxToLQP6yjsvm0/8e3xQnv7SbSYcj3P/OPEdThZOk= sha512-X5K7gsPRYsUSRvJcnj80SLlclDd4X/g1Qgle1L1P4Zb63eUM0mYEfQECBcjcks7iZFItSGr8EVPOVELXO35HUA==" ></script>
<script src="assets/vendor-fe6aaf6bf08a00247e9bb45b00c6c98c.js"></script>
<script src="assets/todomvc-abee913429a66e32e34b282e3460218c.js"></script>
</body> </body>
</html> </html>
...@@ -2,41 +2,42 @@ ...@@ -2,41 +2,42 @@
"name": "todomvc", "name": "todomvc",
"version": "0.0.0", "version": "0.0.0",
"description": "Small description for todomvc goes here", "description": "Small description for todomvc goes here",
"private": true, "license": "MIT",
"author": "Miguel Camba",
"directories": { "directories": {
"doc": "doc", "doc": "doc",
"test": "tests" "test": "tests"
}, },
"repository": "",
"scripts": { "scripts": {
"build": "ember build", "build": "ember build",
"start": "ember server", "start": "ember server",
"test": "ember test" "test": "ember test"
}, },
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": { "devDependencies": {
"broccoli-asset-rev": "^2.4.2", "broccoli-asset-rev": "^2.4.5",
"ember-ajax": "0.7.1", "ember-ajax": "^2.4.1",
"ember-cli": "2.5.0", "ember-cli": "^2.10.0",
"ember-cli-app-version": "^1.0.0", "ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.6", "ember-cli-babel": "^5.1.7",
"ember-cli-dependency-checker": "^1.2.0", "ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.0.3", "ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-inject-live-reload": "^1.4.0", "ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^1.0.0", "ember-cli-jshint": "^2.0.1",
"ember-cli-qunit": "^1.4.0", "ember-cli-qunit": "^3.0.1",
"ember-cli-release": "0.2.8", "ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0", "ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0", "ember-cli-uglify": "^1.2.0",
"ember-export-application-global": "^1.0.5", "ember-export-application-global": "^1.0.5",
"ember-inflector": "1.9.4", "ember-inflector": "1.9.6",
"ember-load-initializers": "^0.5.1", "ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3", "ember-resolver": "^2.0.3",
"loader.js": "^4.0.1" "loader.js": "^4.0.10"
} },
"engines": {
"node": ">= 0.12.0"
},
"private": true
} }
...@@ -47,6 +47,6 @@ ...@@ -47,6 +47,6 @@
"strict": false, "strict": false,
"white": false, "white": false,
"eqnull": true, "eqnull": true,
"esnext": true, "esversion": 6,
"unused": true "unused": true
} }
import { module } from 'qunit'; import { module } from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app'; import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app'; import destroyApp from '../helpers/destroy-app';
const { RSVP: { Promise } } = Ember;
export default function (name, options = {}) { export default function (name, options = {}) {
module(name, { module(name, {
beforeEach() { beforeEach() {
...@@ -13,10 +16,8 @@ export default function (name, options = {}) { ...@@ -13,10 +16,8 @@ export default function (name, options = {}) {
}, },
afterEach() { afterEach() {
if (options.afterEach) { let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
options.afterEach.apply(this, arguments); return Promise.resolve(afterEach).then(() => destroyApp(this.application));
}
destroyApp(this.application);
} }
}); });
} }
...@@ -5,8 +5,8 @@ import config from '../../config/environment'; ...@@ -5,8 +5,8 @@ import config from '../../config/environment';
export default function startApp(attrs) { export default function startApp(attrs) {
let application; let application;
let attributes = Ember.merge({}, config.APP); // use defaults, but you can override
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; let attributes = Ember.assign({}, config.APP, attrs);
Ember.run(() => { Ember.run(() => {
application = Application.create(attributes); application = Application.create(attributes);
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
{{content-for "head"}} {{content-for "head"}}
{{content-for "test-head"}} {{content-for "test-head"}}
<link rel="stylesheet" href="assets/vendor.css"> <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="assets/todomvc.css"> <link rel="stylesheet" href="{{rootURL}}assets/todomvc.css">
<link rel="stylesheet" href="assets/test-support.css"> <link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
{{content-for "head-footer"}} {{content-for "head-footer"}}
{{content-for "test-head-footer"}} {{content-for "test-head-footer"}}
...@@ -21,12 +21,11 @@ ...@@ -21,12 +21,11 @@
{{content-for "body"}} {{content-for "body"}}
{{content-for "test-body"}} {{content-for "test-body"}}
<script src="testem.js" integrity=""></script> <script src="/testem.js" integrity=""></script>
<script src="assets/vendor.js"></script> <script src="{{rootURL}}assets/vendor.js"></script>
<script src="assets/test-support.js"></script> <script src="{{rootURL}}assets/test-support.js"></script>
<script src="assets/todomvc.js"></script> <script src="{{rootURL}}assets/todomvc.js"></script>
<script src="assets/tests.js"></script> <script src="{{rootURL}}assets/tests.js"></script>
<script src="assets/test-loader.js"></script>
{{content-for "body-footer"}} {{content-for "body-footer"}}
{{content-for "test-body-footer"}} {{content-for "test-body-footer"}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment