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
Rollos-Mac-Pro:react-boilerplate Rollo$ npm install jest-cli | |
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"1.7.2","npm":"2.7.6"}) | |
> [email protected] install /Users/Rollo/react-boilerplate/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify | |
> node-gyp rebuild | |
gyp WARN install got an error, rolling back install | |
gyp ERR! configure error | |
gyp ERR! stack Error: 404 status code downloading tarball | |
gyp ERR! stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14) |
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
(django-dropoff)Rollos-Mac-Pro:backbone-playground Rollo$ babel-node /usr/local/bin/node-debug . | |
Node Inspector is now available from http://localhost:8080/debug?port=5858 | |
Debugging `.` | |
Debugger listening on port 5858 | |
/Users/Rollo/Developer/backbone-playground/src/lib/Model.js:1 | |
(function (exports, require, module, __filename, __dirname) { class Model { | |
^^^^^ | |
SyntaxError: Unexpected reserved word | |
at exports.runInThisContext (vm.js:53:16) |
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
(django-dropoff)Rollos-Mac-Pro:backbone-playground Rollo$ babel-node ./node_modules/.bin/mocha | |
/Users/Rollo/Developer/backbone-playground/src/lib/Model.js:1 | |
(function (exports, require, module, __filename, __dirname) { class Model { | |
^^^^^ | |
SyntaxError: Unexpected reserved word | |
at exports.runInThisContext (vm.js:53:16) | |
at Module._compile (module.js:393:25) | |
at Object.Module._extensions..js (module.js:428:10) | |
at Module.load (module.js:335:32) | |
at Function.Module._load (module.js:290:12) |
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
class Model { | |
constructor(string) { | |
this.id = 20; | |
this.name = string; | |
} | |
} | |
module.exports = Model; |
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
function JSONResource(obj) { | |
this._watchFields = new Array(); | |
this._serverCopy = obj; | |
for (var field in obj) { | |
if (obj.hasOwnProperty(field)) { | |
this._watchFields.push(field); | |
this[field] = obj[field]; | |
} | |
} |
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
function JSONResourceCollection(source, Type) { | |
if (Type.prototype.isPrototypeOf(JSONResource.prototype)) { | |
this.Type = Type; | |
} else { | |
// this get's thrown | |
throw "The Type must be a subclass of JSONResource"; | |
} | |
} | |
JSONResourceCollection("http://example.com/", JSONResource); |
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
React.render( | |
<MainViewContainer/>, | |
document.getElementById("main-area") | |
); | |
React.render( | |
<MainSideMenu/>, | |
document.getElementById("sidemenu-nav") | |
); |
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 ProductSearch = React.createClass({ | |
filterList: function(event){ | |
//debugger; | |
var updatedProducts = this.state.initialProducts; | |
updatedProducts = updatedProducts.filter(function(item){ | |
return item.name.toLowerCase().search(event.target.value.toLowerCase()) !== -1; | |
}); | |
this.setState({filteredProducts: updatedProducts}); | |
}, |
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
function myFunction() { | |
console.log("Hello World"); | |
} | |
var SearchBar = React.createClass({ | |
render: function() { | |
return ( | |
<button type="button" onClick= { myFunction() } >Continue</button> | |
); | |
}, |
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 SearchBar = React.createClass({ | |
render: function() { | |
return ( | |
<div className="search-large-wrap"> | |
<div className="search-large-textfield-wrap"> | |
<input placeholder="Search For Existing Products" type="search" className="search-large-textfield" id="search-products"></input> | |
</div> | |
<div className="search-large-submit-wrap"> | |
<button type="button" className="search-large-submit" id="add-products" >Continue</button> | |
</div> |