This file contains hidden or 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
let forecasts = new ForecastCollection(); | |
var Store = _.extend({}, Backbone.Events, { | |
initialize() { | |
this.listenTo(forecasts, 'add remove change', () => this.trigger('change')); | |
}, | |
getForecasts() { | |
return forecasts.toJSON(); | |
}, |
This file contains hidden or 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
/* | |
* Gulp plugins | |
*/ | |
var gulp = require('gulp'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var babel = require('gulp-babel'); | |
var browserSync = require('browser-sync'); | |
var cache = require('gulp-cache'); | |
var concat = require('gulp-concat'); |
This file contains hidden or 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
// -> Define an object called 'Robot' | |
// -> Define a method called 'new' in Robot | |
// -> When Robot.new is called it should return a new object with Robot as its prototype | |
// e.g. var robby = Robot.new(); | |
// Robot should be the prototype of robby | |
var Robot = { | |
new: function() { | |
return Object.create(this); | |
} |
This file contains hidden or 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
// Declare a variable that will later store the selected character and enemy | |
var selectedCharacter; | |
var selectedEnemy; | |
// Define a constructor | |
window.Character = function(params) { | |
_.extend(this, params); | |
}; | |
// Give all characters an attack function |
This file contains hidden or 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 Item = Backbone.Model.extend({ | |
defaults: { | |
name: '', | |
price: '' | |
} | |
}); | |
var ItemCollection = Backbone.Collection.extend({ | |
model: Item, | |
url: "https://api.parse.com/1/classes/Item", |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div id="app-container"></div> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div id="app-container"></div> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div id="app-container"></div> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<div id="app-container"></div> |