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
export class MyComponent extends React.Component { | |
componentWillMount() { | |
const styleid = 'MyComponentStyles' | |
if (document.head.querySelector(`#${styleid}`) !== null) { | |
const styles = document.createElement('style'); | |
styles.id = styleid; | |
styles.append('[foo]{ color: blue; }'); | |
document.head.appendChild(styles); | |
} | |
} |
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 Promise from 'bluebird'; | |
import * as types from '../constants/ActionTypes'; | |
export function loginRequest() { | |
return { | |
type: types.LOGIN_REQUEST | |
} | |
} | |
export function login(credentials) { |
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 gulp = require('gulp'), | |
compass = require('gulp-compass'); | |
var sources = { | |
styles : 'client/app/sass/**/*.scss' | |
} | |
gulp.task('styles', function() { | |
return gulp.src('sources.styles') | |
.pipe(compass({ |
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 DataBinder extends jQuery | |
pubSub: null | |
constructor: (objectid) -> | |
@pubSub = $ {} | |
attribute = "data-bind-#{objectid}" | |
message = "#{objectid}:change" | |
$(document).on "change", "[#{attribute}]", (event) => | |
$elem = $(event.target) |