Tested under webpack-dev-server 1.7.0.
- Clone this gist
npm install
npm start
- Visit http://localhost:8080 (or http://192.168.x.x:8080) on multiple devices
- Edit entry.js and hit save
# Auto-vendor-prefixer | |
# Finds the vendor prefix to use | |
# MIT license, Author: Wout Mertens | |
prefix=null | |
myStyle=document?.head?.style or {} | |
foundProps={} | |
newCssProp = (prop) -> | |
t = foundProps[prop] |
var mongo = require('mongodb') | |
,jqd = require('../jquery-jqd').jqd | |
,host = process.env['MONGO_NODE_DRIVER_HOST'] != null | |
? process.env['MONGO_NODE_DRIVER_HOST'] : 'localhost' | |
,port = process.env['MONGO_NODE_DRIVER_PORT'] != null | |
? process.env['MONGO_NODE_DRIVER_PORT'] : mongo.Connection.DEFAULT_PORT | |
,db = null | |
,gConnection = null; | |
on run | |
-- Figure out if we want to do the cd (doIt) | |
-- Figure out what the path is and quote it (myPath) | |
set doIt to false | |
try | |
tell application "Finder" to set doIt to frontmost | |
set myPath to finder_path() | |
if myPath is equal to "" then | |
set doIt to false | |
else |
// Based on https://gist.github.com/langpavel/b30f3d507a47713b0c6e89016e4e9eb7 | |
const serializeDate = value => { | |
if (value instanceof Date) { | |
return value.toJSON().slice(0, 10) | |
} else if (typeof value === 'number') { | |
return Math.trunc(value) | |
} else if (typeof value === 'string') { | |
return (new Date(value)).toJSON().slice(0, 10) | |
} | |
return null |
export default function withMutation({name, args}) { | |
let mutation; | |
if (args) { | |
const args1 = _.map(args, (type, name) => `$${name}: ${type}`); // e.g. $url: String | |
const args2 = _.map(args, (type, name) => `${name}: $${name}`); // e.g. $url: url | |
mutation = ` | |
mutation ${name}(${args1}) { | |
${name}(${args2}) |
import React, {Component, PropTypes} from 'react' | |
import {Link, Route as OrigRoute, Switch, Redirect, BrowserRouter as Router, withRouter} from 'react-router-dom' | |
// Subscribes a child to history updates, passing the current location as a prop | |
// This is needed to work around the React context API not updating all children | |
// See https://github.com/ReactTraining/react-router/issues/4629#issuecomment-284218493 | |
export class LocationListener extends Component { | |
static contextTypes = { | |
history: PropTypes.object, | |
} |
import DataLoader from 'dataloader' | |
import {graphqlExpress} from 'graphql-server-express' | |
import schema from './schema' | |
import db from './database' | |
const contextFromReq = req => { | |
const {session} = req | |
const loaders = {} | |
const getLoader = (id, makeGetter) => { |
Tested under webpack-dev-server 1.7.0.
npm install
npm start
.SVGIcon { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
/* fix webkit/blink poor rendering issues */ | |
transform: translate3d(0,0,0); | |
/* it's better defined directly because of the cascade shit | |
width: inherit; | |
height: inherit; |
<?xml version="1.0"?> | |
<root> | |
<devicevendordef> | |
<vendorname>WT</vendorname> | |
<vendorid>0x000d</vendorid> | |
</devicevendordef> | |
<deviceproductdef> | |
<productname>TB</productname> | |
<productid>0x0000</productid> |