- FlightJS: A component-based, event-driven JavaScript framework built on top of jQuery. From Twitter.
- React: A declarative, efficient, and flexible JavaScript library for building user interfaces. Developed and used by Facebook and Instagram.
- Redux: Predictable state container for JavaScript application.
- stampit: Create objects from reusable, composable behaviors. Stampit uses three different kinds of prototypal OO to let you inherit behavior in a way that is much more powerful and flexible than classical OO.
- unexpected-react: Extension for unexpected assertion library to make testing React components easier.
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>Embedding</title> | |
</head> | |
<body> | |
<!-- facebook --> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fpolygon%2Fposts%2F1207194309293195&width=500" width="500" height="482" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> |
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> | |
<title>Mocha Tests</title> | |
<link rel="stylesheet" href="/node_modules/mocha/mocha.css"> | |
</head> | |
<body> | |
<div id="mocha"></div> | |
<script src="https://code.jquery.com/jquery.min.js"></script> |
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 webpackConfig = require('./webpack.config') | |
webpackConfig.entry = undefined | |
module.exports = function (config) { | |
config.set({ | |
browsers: ['Chrome'], | |
files: [ | |
'tests.webpack.js' // karma only needs to know where test files are. if you include source files, you are gonna have a bad time. | |
], | |
frameworks: ['mocha'], |
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
➜ when-i-tweet git:(master) npm start | |
> [email protected] start /home/jernej/Code/when-i-tweet | |
> nodemon --ignore ./src | |
[nodemon] 1.10.2 | |
[nodemon] to restart at any time, enter `rs` | |
[nodemon] watching: *.* | |
[nodemon] starting `node index.js` | |
Running on http://localhost:3000 |
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
a |
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, {PropTypes} from 'react' | |
import classnames from 'classnames' | |
import setDisplayName from 'recompose/setDisplayName' | |
import getDisplayName from 'recompose/getDisplayName' | |
import defaultProps from 'recompose/defaultProps' | |
import compose from 'recompose/compose' | |
import setPropTypes from 'recompose/setPropTypes' | |
const FormGroup = ({name, label, error, inputType}) => { | |
const el = React.createElement(inputType, { |
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, { Component } from 'react' | |
import Modal from './Modal' | |
export default class extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
isOpen: false |
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, {Component} from 'react' | |
import forEach from 'lodash/forEach' | |
export default () => ComposedComponent => class extends Component { | |
subscriptions = {} | |
componentWillUnmount() { | |
forEach(this.subscriptions, subscription => { | |
subscription.unsubscribe() | |
}) | |
} |
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
<?php | |
class WP_Settings_Section { | |
protected $id = ''; | |
protected $title = ''; | |
protected $output_callback = ''; | |
protected $fields = array(); | |
public function __construct($id, $title, $output_callback) { | |
$this->id = $id; |