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 { connect } from 'react-redux'; | |
// Some example state data | |
interface Person { | |
name: string; | |
} | |
interface State { | |
people: { | |
[key: string]: Person; |
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 graphql = require('graphql'); | |
function getRequestedFields(query, info) { | |
const parsed = graphql.parse(query); | |
if (parsed.definitions.length > 1) { | |
throw new Error('Too many definitions'); | |
} | |
const requested = info.operation; |
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
jshint: { | |
options: { | |
debug: grunt.option('js-debug') === true, | |
undef: true, | |
unused: 'var', | |
browser: 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
!function(){"use strict";function t(t){function e(){document.body?t():setTimeout(e,0)}e()}function e(t){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(t)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.g=document.createElement("span"),this.f=-1,this.b.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;",this.c.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;",this.g.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;",this.h.style.cssText="display:inline-block;width:200%;height:200%;",this.b.appendChild(this.h),this.c.appendChild(this.g),this.a.appendChild(this.b),this.a.appendChild(this.c)}function i(t,e,i){t.a.style.cssText="min-width:20px;min-height:20px;display:inline-block;position:absolute;width:auto;margin:0;padding:0;top:-999px;le |
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
grunt.initConfig({ | |
karma: { | |
unitTests: { | |
singleRun: true, | |
browsers: ['PhantomJS'], | |
frameworks: ['mocha', 'sinon', 'expect'], | |
options: { | |
files: [ | |
'path/to/codemirror', | |
'path/to/your/source/code', |
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 tpl = function (_swig,_ctx,_filters,_utils,_fn) { | |
var _ext = _swig.extensions, | |
_output = ""; | |
(function () { | |
var __l = (((typeof _ctx.things !== "undefined" && _ctx.things !== null) ? ((typeof _ctx.things !== "undefined" && _ctx.things !== null) ? _ctx.things : "") : ((typeof things !== "undefined" && things !== null) ? things : "")) !== null ? ((typeof _ctx.things !== "undefined" && _ctx.things !== null) ? ((typeof _ctx.things !== "undefined" && _ctx.things !== null) ? _ctx.things : "") : ((typeof things !== "undefined" && things !== null) ? things : "")) : "" ), __len = (_utils.isArray(__l) || typeof __l === "string") ? __l.length : _utils.keys(__l).length; | |
if (!__l) { return; } | |
var _ctx__loopcache07607445325702429 = { loop: _ctx.loop, thing: _ctx.thing, __k: _ctx.__k }; | |
_ctx.loop = { first: false, index: 1, index0: 0, revindex: __len, revindex0: __len - 1, length: __len, last: false }; | |
_utils.each(__l, function (thing, __k) { | |
_ctx.thing = thing; |
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
coverage: { | |
// set this to the coverage object created from running the instrumented code | |
coverage: null, | |
// task for generating instrumented code |
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
/** | |
* CSSLinter Class | |
* @param {Object} options | |
* @constructor | |
*/ | |
var CSSLinter = function (options) { | |
var css = require('css'); | |
var fs = require('fs'); |
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 templates = { | |
register: function (key, template) { | |
this[key] = _.template( | |
'<% ' + | |
'var include=_.bind(function(k,d){print(this[k](d))},this);' + | |
'var includeEach=_.bind(function(k,d){_.each(d,function(v){print(this[k](v))},this)},this);' + | |
'var includeIf=_.bind(function(k,d){if(d)print(this[k](d))},this);' + | |
' %>' + | |
template, | |
null, |
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
(function (root) { | |
var type = function (o) { | |
// handle null in old IE | |
if (o === null) { | |
return 'null'; | |
} | |
// handle DOM elements |
NewerOlder