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'); | |
var gutil = require('gulp-util'); | |
var bower = require('bower'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var minifyCss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var sh = require('shelljs'); | |
var templateCache = require('gulp-angular-templatecache'); |
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
/*globals PIXI */ | |
'use strict' | |
var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight, { | |
antialias: true, | |
view : document.getElementById('canvas'), | |
transparent: true | |
}); |
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> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com/canary/ember.prod.js"></script> | |
</head> |
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 Button extends React.Component { | |
handleClick () { | |
console.log(this) | |
} | |
render () { | |
return ( | |
<div onClick={(e) => this.handleClick(e)}> | |
Click | |
</div> |
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 Button extends React.Component { | |
handleClick () { | |
console.log(this) | |
} | |
render () { | |
return ( | |
<div onClick={::this.handleClick}> | |
Click | |
</div> |
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 Button extends React.Component { | |
constructor (props) { | |
super(props) | |
this.handleClick = this.handleClick.bind(this) | |
} | |
handleClick () { | |
console.log(this) | |
} |
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 Button extends React.Component { | |
handleClick = (e) => { | |
console.log(this) | |
} | |
render () { | |
return ( | |
<div onClick={this.handleClick}> | |
Click | |
</div> |
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 React from 'react'; | |
import { Control, Form } from 'react-redux-form'; | |
class UserForm extends React.Component { | |
render() { | |
return ( | |
<Form model="forms.user" | |
onSubmit={(user) => | |
console.log('-->', user) | |
}> |
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
let pouchMiddleware | |
let invalidate = true; | |
const MyWrapperMiddleware = store => next => action => { | |
const state = store.getState() | |
if (!state.isLoggedIn) | |
return next(action) | |
if (someConditionForChange) { |
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
const MyWrapperMiddleware = store => next => action => { | |
const state = store.getState() | |
if (!state.isLoggedIn) | |
return next(action) | |
const pouchMiddleware = PouchMiddleware({ | |
path: state.currentPath, | |
db, |
OlderNewer