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
const build = () => { | |
const bundler = new Bundler(paths.appHtml, { | |
command: 'build', | |
outDir: paths.appBuild, | |
publicUrl: './', | |
cacheDir: './.parcelCache', | |
// Generate Source Maps for prod | |
sourceMaps: true, | |
}); |
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="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="shortcut icon" href="./favicon.ico"> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="../src/index.js"></script> |
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
const mergeProps = ({assets, playerItemAssets, items, player}, dispatchToProps, props) => ({ | |
assets, | |
playerItemAssets, | |
items, | |
player, | |
...dispatchToProps, | |
missingItemAssets: memoMissingAssets(assets, playerItemAssets), | |
playerMesh: { | |
verts: selectPlayerAnim(playerItemAssets, player.skeleton, assets), | |
count: (selectPlayerAnim(playerItemAssets, player.skeleton, assets).length / 12), |
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
/* eslint-disable import/prefer-default-export */ | |
// @flow | |
import { createSelectorCreator } from 'reselect'; | |
const defaultEqualityCheck = (a, b) => (a === b); | |
/** | |
* A selector that will only change the output if the first argument has changed. | |
*/ | |
export const firstArgSelector = createSelectorCreator( |
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
// @flow | |
import React from 'react'; | |
import { | |
Form, | |
Input, | |
Checkbox, | |
Radio, | |
Select, | |
Dropdown, | |
TextArea, |
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
// Materialize | |
<Input | |
s=number // ########## | |
m=number // Media query sizes | |
l=number // ########## | |
children=node | |
className=string | |
label=node | |
error=string | |
success=string |
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
const apiResponse = [ | |
{first: 'Bob', favorite: 'The Clash'}, | |
{first: 'Linda', favorite: 'Ramones'}, | |
{first: 'Amy', favorite: 'The Clash'}, | |
]; | |
const friendConstants = ['Bob', 'Amy', 'James', 'Tiffany', 'Linda']; | |
friendConstants.reduce((acc, friend, idx, orgArray) => ({ | |
// Check for friend in apiResponse | |
// if there pull them out otherwise we create a default objecct |
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
const records = [ | |
{ title: "The Clash", artist: "The Clash", type: "LP", lengthSec: 2220, released: "1977"}, | |
{ title: "Rocket to Russia", artist: "Ramones", type: "LP", lengthSec: 1906, released: "1977"}, | |
{ title: "London Calling", artist: "The Clash", type: "LP", lengthSec: 3903, released: "1979"}, | |
{ title: "Ramones", artist: "Ramones", type: "LP", lengthSec: 1755, released: "1976"}, | |
...etc | |
]; | |
const removeIndexes = [1, 2]; | |
records.reduceRight((acc, item, idx) => { |