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
#!/bin/bash | |
if [[ "$1" != "" ]]; then | |
S3BUCKETNAME="$1" | |
else | |
echo ERROR: Failed to supply S3 bucket name | |
exit 1 | |
fi | |
aws s3 sync build s3://$S3BUCKETNAME --delete --cache-control max-age=31536000,public |
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
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
const eslintFormatter = require('react-dev-utils/eslintFormatter'); |
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
'use strict'; | |
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); | |
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); | |
const path = require('path'); | |
const config = require('./webpack.config.dev'); | |
const paths = require('./paths'); | |
const express = require('express'); | |
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; |
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
'use strict'; | |
// Do this as the first thing so that any code reading it knows the right env. | |
process.env.BABEL_ENV = 'development'; | |
process.env.NODE_ENV = 'development'; | |
// Makes the script crash on unhandled rejections instead of silently | |
// ignoring them. In the future, promise rejections that are not handled will | |
// terminate the Node.js process with a non-zero exit code. | |
process.on('unhandledRejection', 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
import React, { PropTypes, Component } from 'react' | |
class ContextExample extends Component { | |
static childContextTypes = { | |
config: PropTypes.object, | |
} | |
getChildContext() { |
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
// In production, we register a service worker to serve assets from local cache. | |
// This lets the app load faster on subsequent visits in production, and gives | |
// it offline capabilities. However, it also means that developers (and users) | |
// will only see deployed updates on the "N+1" visit to a page, since previously | |
// cached resources are updated in the background. | |
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. | |
// This link also includes instructions on opting out of this behavior. |
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 List = ({ items, onClick }) => ( | |
<ul> | |
{items.map(item => ( | |
<ClickHandler key={item.id} data={item} onClick={onClick}> | |
{(handleClick) => ( | |
<li onClick={handleClick}> | |
{item.text} | |
</li> | |
)} | |
</ClickHandler> |
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 List = ({ items, onClick }) => ( | |
<ul> | |
{items.map(item => ( | |
<li onClick={() => onClick(item)}> | |
{item.text} | |
</li> | |
))} | |
</ul> | |
) |
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 List = ({ items, onClick }) => ( | |
<ul> | |
{items.map(item => ( | |
<li> | |
{item.text} | |
</li> | |
))} | |
</ul> | |
) |
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 CacheClientPromise from 'cache-client-promise' | |
const myCache = new CacheClientPromise(); | |
[{ | |
id: 1234, | |
title: 'test', | |
view: 'two-column' | |
}, | |
{ |
NewerOlder