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 _ = require('underscore'); | |
var domready = require('domready'), | |
bean = require('bean'), // events | |
bonzo = require('bonzo'), // DOM wrapper/manipulation | |
qwery = require('qwery'), // css selectors | |
morpheus = require('morpheus'), | |
slice = Array.prototype.slice; | |
// Attach events API to the prototype of DOM wrapper: |
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 util = require('util'), | |
_ = require('underscore'), | |
EventEmitter = require('events').EventEmitter | |
function Store(ctx, initial) { | |
this.state = initial || {}; | |
EventEmitter.call(this); | |
this.initialize.apply(this, arguments); | |
} |
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 _ = require('underscore'), | |
Parser = require('jade/lib/parser'); | |
module.exports = { | |
toJSON: toJSON, | |
fromJSON: fromJSON | |
} | |
function toJSON(src, options) { | |
var parser = new Parser(src), |
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
diff --git a/src/clj/cljs/repl/node_repl.js b/src/clj/cljs/repl/node_repl.js | |
index 6bc1cd2..46e7f7e 100644 | |
--- a/src/clj/cljs/repl/node_repl.js | |
+++ b/src/clj/cljs/repl/node_repl.js | |
@@ -1,6 +1,7 @@ | |
process.env.NODE_DISABLE_COLORS = true; | |
-var net = require("net"); | |
+var net = require("net"), | |
+ vm = require('vm'); |
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
// going to use _ for array flattening until this - http://yuilibrary.com/projects/yui3/ticket/2531371 is resolved. | |
var _ = require('underscore'), | |
YUI = require('yui3').YUI; | |
YUI.add('node-js', function (Y) { | |
Y.namespace('nodejs'); | |
Y.nodejs.require = function () { | |
var requires = {}, | |
modules = _.flatten(arguments); |
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
match = require 'minimatch' | |
_ = require 'underscore' | |
class Events | |
constructor: -> | |
@_events = []; | |
on: (evt, handler = _.i, scope = @) -> | |
@_events.push {evt, handler, scope};@ | |
fire: (evt, args...) -> | |
_.each @_events, (spec) => |
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
match = require 'minimatch' | |
_ = require 'underscore' | |
class Events | |
on: (evt, handler = _.i, scope = @) -> | |
@_events or= [] | |
spec = | |
evt: evt | |
handler: handler | |
scope: scope |
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 q = function() { | |
var args = _.flatten(arguments); | |
var ctr = args.length; | |
var complete; | |
function run(i) { | |
args[i](function() { | |
if (i + 1 === ctr) { | |
if (complete) { | |
complete(); |
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
k.task('a', function(done){ done(); }); | |
k.task('b', function(done){ done(); }); | |
k.task('c', function(done){ | |
this.D.a().b().then(done); | |
}); | |
k().D.c().then(function(){ | |
console.log('done!'); |
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
// like https://github.com/meadow/redux-ensure-fsa, but allows `optimist` as a key | |
import isPlainObject from 'lodash.isplainobject'; | |
const validKeys = [ | |
'type', | |
'payload', | |
'error', | |
'meta', | |
'optimist' |
OlderNewer