Skip to content

Commit

Permalink
@gvaish Merge remote-tracking branch 't/gh-pages' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaish committed May 13, 2013
2 parents ac94dbb + b6d929c commit a166302
Show file tree
Hide file tree
Showing 316 changed files with 17,488 additions and 2,648 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

function getSourcePath() {
// If accessed via addyosmani.github.io/todomvc/, strip the project path.
// If accessed via tastejs.github.io/todomvc/, strip the project path.
if (location.hostname.indexOf('github.io') > 0) {
return location.pathname.replace(/todomvc\//, '');
}
Expand All @@ -17,7 +17,7 @@
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/addyosmani/todomvc/tree/gh-pages';
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages';

if (footer) {
sourceLink.href = urlBase + getSourcePath();
Expand All @@ -28,8 +28,8 @@
}

function redirect() {
if (location.hostname === 'addyosmani.github.io') {
location.href = location.href.replace('addyosmani.github.io/todomvc', 'todomvc.com');
if (location.hostname === 'tastejs.github.io') {
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
}
}

Expand Down
8 changes: 4 additions & 4 deletions architecture-examples/agilityjs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Agility.js • TodoMVC</title>
<link rel="stylesheet" href="components/todomvc-common/base.css">
<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
</head>
<body>
<section id="todoapp">
Expand Down Expand Up @@ -47,9 +47,9 @@ <h1>todos</h1>
<p>Created by <a href="http://github.com/tshm/todomvc/">Tosh Shimayama</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="components/todomvc-common/base.js"></script>
<script src="components/jquery/jquery.js"></script>
<script src="components/agility/agility.js"></script>
<script src="bower_components/todomvc-common/base.js"></script>
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/agility/agility.js"></script>
<script src="js/localstorage.js"></script>
<script src="js/app.js"></script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

function getSourcePath() {
// If accessed via addyosmani.github.io/todomvc/, strip the project path.
// If accessed via tastejs.github.io/todomvc/, strip the project path.
if (location.hostname.indexOf('github.io') > 0) {
return location.pathname.replace(/todomvc\//, '');
}
Expand All @@ -17,7 +17,7 @@
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/addyosmani/todomvc/tree/gh-pages';
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages';

if (footer) {
sourceLink.href = urlBase + getSourcePath();
Expand All @@ -28,8 +28,8 @@
}

function redirect() {
if (location.hostname === 'addyosmani.github.io') {
location.href = location.href.replace('addyosmani.github.io/todomvc', 'todomvc.com');
if (location.hostname === 'tastejs.github.io') {
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
}
}

Expand Down
6 changes: 3 additions & 3 deletions architecture-examples/angularjs-perf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>AngularJS • TodoMVC</title>
<link rel="stylesheet" href="components/todomvc-common/base.css">
<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
<style>[ng-cloak] {display: none}</style>
</head>
<body>
Expand Down Expand Up @@ -59,8 +59,8 @@ <h1>todos</h1>
</p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="components/todomvc-common/base.js"></script>
<script src="components/angular/angular.js"></script>
<script src="bower_components/todomvc-common/base.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/todoCtrl.js"></script>
<script src="js/services/todoStorage.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions architecture-examples/angularjs-perf/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# AngularJS (performance optimized) TodoMVC app

The normal AngularJS TodoMVC implemetation performs deep watching of the todos array object. This means that it keeps an in-memory copy of the complete array that is used for dirty checking in order to detect model mutations. For smaller applications such as TodoMVC, this is completely fine as one trades off a little memory and performance for the sake of simplicity.

In larger more complex applications however, where one might be working with 100s or 1000s of large objects one definitely should avoid using this approach. This implementation of the AngularJS app demonstrates the correct way to approach this problem when working in larger apps.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

function getSourcePath() {
// If accessed via addyosmani.github.io/todomvc/, strip the project path.
// If accessed via tastejs.github.io/todomvc/, strip the project path.
if (location.hostname.indexOf('github.io') > 0) {
return location.pathname.replace(/todomvc\//, '');
}
Expand All @@ -17,7 +17,7 @@
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/addyosmani/todomvc/tree/gh-pages';
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages';

if (footer) {
sourceLink.href = urlBase + getSourcePath();
Expand All @@ -28,8 +28,8 @@
}

function redirect() {
if (location.hostname === 'addyosmani.github.io') {
location.href = location.href.replace('addyosmani.github.io/todomvc', 'todomvc.com');
if (location.hostname === 'tastejs.github.io') {
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
}
}

Expand Down
6 changes: 3 additions & 3 deletions architecture-examples/angularjs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>AngularJS • TodoMVC</title>
<link rel="stylesheet" href="components/todomvc-common/base.css">
<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
<style>[ng-cloak] {display: none}</style>
</head>
<body>
Expand Down Expand Up @@ -59,8 +59,8 @@ <h1>todos</h1>
</p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="components/todomvc-common/base.js"></script>
<script src="components/angular/angular.js"></script>
<script src="bower_components/todomvc-common/base.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/todoCtrl.js"></script>
<script src="js/services/todoStorage.js"></script>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

function getSourcePath() {
// If accessed via addyosmani.github.io/todomvc/, strip the project path.
// If accessed via tastejs.github.io/todomvc/, strip the project path.
if (location.hostname.indexOf('github.io') > 0) {
return location.pathname.replace(/todomvc\//, '');
}
Expand All @@ -17,7 +17,7 @@
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/addyosmani/todomvc/tree/gh-pages';
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages';

if (footer) {
sourceLink.href = urlBase + getSourcePath();
Expand All @@ -28,8 +28,8 @@
}

function redirect() {
if (location.hostname === 'addyosmani.github.io') {
location.href = location.href.replace('addyosmani.github.io/todomvc', 'todomvc.com');
if (location.hostname === 'tastejs.github.io') {
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
}
}

Expand Down
12 changes: 6 additions & 6 deletions architecture-examples/backbone/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Backbone.js • TodoMVC</title>
<link rel="stylesheet" href="components/todomvc-common/base.css">
<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
</head>
<body>
<section id="todoapp">
Expand Down Expand Up @@ -49,11 +49,11 @@ <h1>todos</h1>
<button id="clear-completed">Clear completed (<%= completed %>)</button>
<% } %>
</script>
<script src="components/todomvc-common/base.js"></script>
<script src="components/jquery/jquery.js"></script>
<script src="components/underscore/underscore.js"></script>
<script src="components/backbone/backbone.js"></script>
<script src="components/backbone.localStorage/backbone.localStorage.js"></script>
<script src="bower_components/todomvc-common/base.js"></script>
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/backbone/backbone.js"></script>
<script src="bower_components/backbone.localStorage/backbone.localStorage.js"></script>
<script src="js/models/todo.js"></script>
<script src="js/collections/todos.js"></script>
<script src="js/views/todos.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion architecture-examples/backbone/js/views/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global Backbone _ $ ENTER_KEY */
/*global Backbone, jQuery, _, ENTER_KEY */
var app = app || {};

(function ($) {
Expand Down
2 changes: 1 addition & 1 deletion architecture-examples/backbone/js/views/todos.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global Backbone _ $ ENTER_KEY */
/*global Backbone, jQuery, _, ENTER_KEY */
var app = app || {};

(function ($) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(function () {
'use strict';

if (location.hostname === 'todomvc.com') {
window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
}

function getSourcePath() {
// If accessed via tastejs.github.io/todomvc/, strip the project path.
if (location.hostname.indexOf('github.io') > 0) {
return location.pathname.replace(/todomvc\//, '');
}
return location.pathname;
}

function appendSourceLink() {
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages';

if (footer) {
sourceLink.href = urlBase + getSourcePath();
sourceLink.appendChild(document.createTextNode('Check out the source'));
paragraph.appendChild(sourceLink);
footer.appendChild(paragraph);
}
}

function redirect() {
if (location.hostname === 'tastejs.github.io') {
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
}
}

appendSourceLink();
redirect();
})();
10 changes: 5 additions & 5 deletions architecture-examples/canjs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>CanJS • TodoMVC</title>
<link rel="stylesheet" href="components/todomvc-common/base.css">
<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
</head>
<body>
<section id="todoapp">
Expand All @@ -15,10 +15,10 @@
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>

<script src="components/jquery/jquery.js"></script>
<script src="components/todomvc-common/base.js"></script>
<script src="components/canjs/can.jquery.js"></script>
<script src="components/canjs-localstorage/can.localstorage.js"></script>
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/todomvc-common/base.js"></script>
<script src="bower_components/canjs/can.jquery.js"></script>
<script src="bower_components/canjs-localstorage/can.localstorage.js"></script>

<script src="js/lib/can.mustache.min.js"></script>
<script src="js/models/todo.js"></script>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(function () {
'use strict';

if (location.hostname === 'todomvc.com') {
window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
}

function getSourcePath() {
// If accessed via tastejs.github.io/todomvc/, strip the project path.
if (location.hostname.indexOf('github.io') > 0) {
return location.pathname.replace(/todomvc\//, '');
}
return location.pathname;
}

function appendSourceLink() {
var sourceLink = document.createElement('a');
var paragraph = document.createElement('p');
var footer = document.getElementById('info');
var urlBase = 'https://github.com/tastejs/todomvc/tree/gh-pages';

if (footer) {
sourceLink.href = urlBase + getSourcePath();
sourceLink.appendChild(document.createTextNode('Check out the source'));
paragraph.appendChild(sourceLink);
footer.appendChild(paragraph);
}
}

function redirect() {
if (location.hostname === 'tastejs.github.io') {
location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com');
}
}

appendSourceLink();
redirect();
})();
38 changes: 0 additions & 38 deletions architecture-examples/closure/components/todomvc-common/base.js

This file was deleted.

4 changes: 2 additions & 2 deletions architecture-examples/closure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Closure • TodoMVC</title>
<link rel="stylesheet" href="components/todomvc-common/base.css">
<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
</head>
<body>
<section id="todoapp">
Expand Down Expand Up @@ -37,7 +37,7 @@ <h1>todos</h1>
<p>Created by <a href="http://www.scottlogic.co.uk/blog/chris/">Chris Price</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="components/todomvc-common/base.js"></script>
<script src="bower_components/todomvc-common/base.js"></script>
<!-- The compiled version (to update run java -jar build/plovr.jar build plovr.json > js/compiled.js) -->
<script type="text/javascript" src="js/compiled.js"></script>
<!-- The RAW development version (to serve the files run java -jar build/plovr.jar serve plovr.json) -->
Expand Down
Loading

0 comments on commit a166302

Please sign in to comment.