View gist:b3cb84b3738d37106c6d
This file contains 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 App extends React.Component { | |
componentDidMount () { | |
history.listen((location) => { | |
this.props.dispatch({ type: 'ROUTE_CHANGE', location }) | |
}) | |
}, | |
render () { | |
return ( |
View build.js
This file contains 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
// this file is designed to freak you out | |
const fs = require('fs') | |
const path = require('path') | |
const hbs = require('handlebars') | |
const cheerio = require('cheerio') | |
!function main() { | |
return process.stdout.write( | |
template()( | |
templateLocals()))}() |
View resolver_new-a0f3198604bf00a43082a4fccd8995e5325b521a.coffee
This file contains 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 ['require', 'ember'], (req, Ember) -> | |
underscore = Ember.String.underscore | |
Ember.DefaultResolver.extend | |
base: '' | |
# attempts to require the module from the AMD registry | |
resolve: (fullName) -> |
View upgrade-bash.sh
This file contains 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
brew install bash | |
echo "/usr/local/bin/bash" | sudo tee -a /etc/shells | |
chsh -s /usr/local/bin/bash |
View inherit-model.js
This file contains 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 Ember = require('ember'); | |
Ember.Route.reopen({ | |
model: function(params, transition) { | |
var match, name, sawParams, value; | |
for (var prop in params) { | |
if (prop === 'queryParams') { continue; } | |
if (match = prop.match(/^(.*)_id$/)) { | |
name = match[1]; |
View inherit-model.js
This file contains 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 Ember = require('ember'); | |
Ember.Route.reopen({ | |
model: function(params, transition) { | |
var match, name, sawParams, value; | |
for (var prop in params) { | |
if (prop === 'queryParams') { continue; } | |
if (match = prop.match(/^(.*)_id$/)) { | |
name = match[1]; |
View index.html
This file contains 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> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="bower_components/qunit/qunit/qunit.css"> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> | |
<script src="bower_components/jquery/jquery.js"></script> | |
<script src="bower_components/handlebars/handlebars.js"></script> | |
<script src="bower_components/ember/ember.js"></script> |
View setup.js
This file contains 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.prototype.compile = function() { | |
var template = this.toString().split('\n').slice(1,-1).join('\n') + '\n'; | |
return Ember.Handlebars.compile(template); | |
} | |
/*******************************************************/ | |
test('sets first tab found to active', function() { | |
expect(2); | |
var component = this.subject({ |
View tab-panel.js
This file contains 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
import { Component, computed } from 'ember'; | |
export default Component.extend({ | |
tagName: 'ic-tab-panel', | |
attributeBindings: [ | |
'role', | |
'aria-labeledby' | |
], |
OlderNewer