- Make sure you have yo installed:
npm install -g yo
- Run:
yo webapp
- Install grunt-contrib-jade:
npm install grunt-contrib-jade --save-dev
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 most = require('most'); | |
var DROP = 0, GRAB = 1, DRAG = 2; | |
// The thing we want to make draggable | |
var playground = document.querySelector('.playground'); | |
var draggable = document.querySelector('.draggable'); | |
var dragOffset = {}; | |
// A higher-order stream (stream whose events are themselves streams) |
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
import React, { Component } from 'react'; | |
import excEnv from 'react/lib/ExecutionEnvironment'; | |
import most from 'most' | |
export default function Stream(streams) { | |
return DecoratedComponent => { | |
class StreamComponent extends Component { | |
constructor(props) { |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var most = require('most'); | |
var endlessStream = most.create( function(add, end, error) { | |
function count(int) { | |
add(int); | |
int++; | |
setTimeout(count, 1000, int); |
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
.ngGrid { | |
} | |
.ngGrid input { | |
vertical-align: top; | |
} | |
.ngGrid.unselectable { | |
-moz-user-select: none; |
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
/*********************************************** | |
* ng-grid JavaScript Library | |
* Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md | |
* License: MIT (http://www.opensource.org/licenses/mit-license.php) | |
* Compiled At: 07/06/2013 13:50 | |
***********************************************/ | |
(function(window, $) { | |
'use strict'; | |
// the # of rows we want to add to the top and bottom of the rendered grid rows | |
var EXCESS_ROWS = 6; |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} |
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
.slideFade { | |
position: relative; | |
height: 0; | |
opacity: 0; | |
overflow: hidden; | |
@include transition(height .35s ease); | |
} | |
.slideFade.in { | |
opacity: 1; | |
height: auto; |
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
_.extend Backbone.Validation.callbacks, | |
valid: (view, attr, selector) -> | |
control = view.$('[' + selector + '=' + attr + ']') | |
group = control.parents(".control-group") | |
group.removeClass("error") | |
if control.data("error-style") == "tooltip" | |
# CAUTION: calling tooltip("hide") on an uninitialized tooltip | |
# causes bootstraps tooltips to crash somehow... | |
control.tooltip "hide" if control.data("tooltip") |
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
<!DOCTYPE HTML> | |
<html lang=""> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<link rel="icon" href="favicon.ico" type="image/x-icon"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="css/style.css"> |