Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
var webpackModule = require('./webpack.module.js'); | |
var webpackResolve = require('./webpack.resolve.js'); | |
var Webpack = require('webpack'); | |
var RewirePlugin = require("rewire-webpack"); | |
module.exports = function(config) { | |
config.set({ | |
// frameworks to use | |
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
/* | |
Insert a Promise into a pre-defined Promise chain. | |
@param promiseBlock [Function] takes a Promise | |
parameter & returns the continuation of that parameter. | |
@return [Promise] the fullfilled Promise chain | |
*/ | |
function wrapPromise(promiseBlock) { | |
if (typeof promiseBlock !== 'function') { | |
throw new Error('promiseBlock must be a Function'); |
module.exports = { | |
WEBPACK_ENV: JSON.stringify('development'), | |
FOO: JSON.stringify('per-environment foo value') | |
}; |
import React from 'react'; | |
// Top-level Route component receives the router in context and passes it onto each child's props | |
export default class AppView extends React.Component { | |
render() { | |
return ( | |
<div className="container"> | |
{ | |
// Add `props.router` to each route component | |
React.Children.map(this.props.children, c => { |
/* | |
Filepicker lib must be loaded from script tag in HTML: | |
<script type="text/javascript" src="//api.filepicker.io/v2/filepicker.js"></script> | |
*/ | |
class FilepickerInput extends React.Component { | |
componentDidMount() { | |
const filepickerElement = this.refs.filepicker; | |
if (typeof filepicker !== 'undefined') { | |
// Single-page app integration: https://developers.filepicker.com/docs/support/integration/117 |
Action & Adventure based on a book from the 1960s (4082) | |
Action & Adventure based on a book from the 1970s (2410) | |
Action & Adventure based on a book from the 1980s (704) | |
Action & Adventure based on real life from the 1980s (1051) | |
Action & Adventure directed by Andrew V. McLaglen (2282) | |
Action & Adventure directed by Cirio H. Santiago (4323) | |
Action & Adventure directed by Clint Eastwood (4998) | |
Action & Adventure directed by Corey Yuen (291) | |
Action & Adventure directed by George Archainbaud (3183) | |
Action & Adventure directed by George Sherman (3198) |
#!/usr/bin/env bash | |
# Fail immediately on non-zero exit code. | |
set -e | |
# Fail immediately on non-zero exit code within a pipeline. | |
set -o pipefail | |
# Fail on undeclared variables. | |
set -u | |
# Debug, echo every command | |
#set -x |
## Global install of the app generator | |
npm install -g create-react-app | |
## Setup the app (first-time only) | |
create-react-app my-app | |
cd my-app | |
git init | |
# Create the Heroku app; requires free account at https://www.heroku.com/ | |
heroku create -b https://github.com/heroku/heroku-buildpack-static.git |
There's a lot of knowledge to be had about buildpacks. Start with reading the main docs:
bash inherently swallows errors thrown by commands. Use the following at the top of your compile script: