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 gulp = require('gulp') | |
const rollup = require('rollup-stream') | |
const source = require('vinyl-source-stream') | |
const postcss = require('gulp-postcss') | |
const purify = require('gulp-purifycss') | |
const sass = require('gulp-sass') | |
const nodeResolve = require('rollup-plugin-node-resolve') | |
const commonjs = require('rollup-plugin-commonjs') | |
const replace = require('rollup-plugin-replace') | |
const babel = require('rollup-plugin-babel') |
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 gobble = require('gobble') | |
const nodeResolve = require('rollup-plugin-node-resolve') | |
const commonjs = require('rollup-plugin-commonjs') | |
const replace = require('rollup-plugin-replace') | |
const babel = require('rollup-plugin-babel') | |
const uglify = require('rollup-plugin-uglify') | |
const autoprefixer = require('autoprefixer') | |
const cssnano = require('cssnano') | |
const pkg = require('./package') | |
const purifycss = require('purify-css') |
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 reporter, { errorReporter as newrelicErrorReporter, crashReporter as newrelicCrashReporter } from 'redux-reporter' | |
const report = (error) => { | |
try { | |
window.newrelic.noticeError(error) | |
} catch (err) {} | |
} | |
export const crashReporter = newrelicCrashReporter(report) | |
export const errorReporter = newrelicErrorReporter(report) |
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 express from 'express'; | |
const app = express(); | |
if (IS_DEV) { | |
require('piping')(); | |
} | |
//express routes, etc. | |
export default app; |
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 fs = require('fs') | |
const rollup = require('rollup').rollup | |
const _sass = require('node-sass') | |
const buble = require('rollup-plugin-buble') | |
const json = require('rollup-plugin-json') | |
const commonjs = require('rollup-plugin-commonjs') | |
const replace = require('rollup-plugin-replace') | |
const uglify = require('rollup-plugin-uglify') | |
const nodeResolve = require('rollup-plugin-node-resolve') | |
const url = require('rollup-plugin-url') |
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
export default (fn, cb) => { | |
try { | |
fn() | |
} catch (err) { | |
if(cb) { cb(err) } | |
} | |
} |
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 logger = (store) => (next) => (action) => { | |
console.groupCollapsed(action.type) | |
console.info('action:', action) | |
const result = next(action) | |
console.debug('state:', store.getState()) | |
console.groupEnd(action.type) | |
return result |
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 fs = require('fs') | |
const _sass = require('node-sass') | |
const cssnano = require('cssnano') | |
const purifycss = require('purify-css') | |
const promisify = (ctx, func = ctx) => (...args) => { | |
return new Promise((resolve, reject) => { | |
func.apply(ctx, [...args, (err, result) => err ? reject(err) : resolve(result)]) | |
}) | |
} |
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
// src/app/preactDomRenderer.js | |
import { h, render } from 'preact'; | |
import undom from 'undom'; | |
const VOID_ELEMENTS = [ | |
'area', | |
'base', | |
'br', | |
'col', |
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 'file?name=[name].[ext]!./utils/serviceworker.js'; | |
import '../css/components/_app.css'; | |
import 'babel-polyfill'; | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import configureStore from './store/configureStore'; | |
import Root from './containers/Root'; | |
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('/serviceworker.js'); |