// Concat modules and export them as an app. (function(root) { // All our modules will use global require. (function() { // app.coffee root.require.register('burnchart/src/app.js', function(exports, require, module) { var App, header; header = require('./components/header'); document.title = 'BurnChart: GitHub Burndown Chart as a Service'; App = Ractive.extend({ template: require('./templates/layout'), 'components': { 'Header': header } }); module.exports = new App(); }); // header.coffee root.require.register('burnchart/src/components/header.js', function(exports, require, module) { var firebase, user; firebase = require('../modules/firebase'); user = require('../modules/user'); module.exports = Ractive.extend({ 'template': require('../templates/header'), init: function() { return this.on('login', function() { return firebase.login(function(err) { if (err) { throw err; } }); }); }, 'data': { user: user }, 'adapt': [Ractive.adaptors.Ractive] }); }); // config.json root.require.register('burnchart/src/models/config.js', function(exports, require, module) { module.exports = { "firebase": "burnchart", "provider": "github" }; }); // firebase.coffee root.require.register('burnchart/src/modules/firebase.js', function(exports, require, module) { var FB, authCb, config, user; config = require('../models/config'); user = require('./user'); authCb = function() {}; FB = (function() { function FB() { this.client = new Firebase("https://" + config.firebase + ".firebaseio.com"); this.auth = new FirebaseSimpleLogin(this.client, function(err, obj) { if (err || !obj) { return authCb(err); } user.set(obj); return console.log("" + obj.displayName + " is logged in"); }); } FB.prototype.login = function(cb) { if (!this.client) { return cb('Client is not setup'); } authCb = cb; console.log('Connecting GitHub account'); return this.auth.login(config.provider, { 'rememberMe': true, 'scope': 'public_repo' }); }; FB.prototype.logout = function() { var _ref; if ((_ref = this.auth) != null) { _ref.logout; } user.reset(); return console.log('You have logged out'); }; return FB; })(); module.exports = new FB(); }); // user.coffee root.require.register('burnchart/src/modules/user.js', function(exports, require, module) { module.exports = new Ractive(); }); // header.mustache root.require.register('burnchart/src/templates/header.js', function(exports, require, module) { module.exports = ["
The one where we deliver all that we promised.
","Not sure where to start? Just add a demo repo to see a chart. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.
","radekstepan/disposable | ","Milestone 1.0 | ",""," "," 40%"," due on Friday"," "," "," "," "," | ","
radekstepan/burnchart | ","Beta Milestone | ",""," "," 100%"," due tomorrow"," "," "," "," "," | ","
intermine/intermine | ","Emma Release 96 | ",""," "," 27%"," due in 2 weeks"," "," "," "," "," | ","
microsoft/windows | ","RC 9 | ",""," "," 90%"," overdue by a month"," "," "," "," "," | ","