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
FROM node | |
RUN mkdir -p /app | |
WORKDIR /app | |
# .deps.json will only bust the cache when the package.json dependencies change | |
COPY .deps.json /app/package.json | |
RUN npm install | |
# cache will almost always bust here, but it's only copying files |
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
redis: | |
image: redis | |
postgres: | |
image: postgres | |
environment: | |
- POSTGRES_PASSWORD=sentry | |
- POSTGRES_USER=sentry | |
volumes: | |
- /var/lib/postgresql/data |
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 PurchaseComplete = (props) => | |
(<div className="purchase-complete"> | |
<h2>Thanks!</h2> | |
<p> | |
Thank you for your purchase of {formatPrice(this.state.total)}. | |
We’ll send you a receipt shortly. | |
</p> | |
<p> | |
<button | |
className="cta-button outlined-button" |
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
{ | |
"universal": true, | |
"embed": true, | |
"bower": true, | |
"commonsChunk": true, | |
"longTermCaching": false, | |
"separateStylesheet": false, | |
"minimize": false, | |
"devtool": "cheap-module-eval-source-map", | |
"devServer": true, |
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
{ | |
isomorphic: true, /* Create a version to run server-side. default: false. unless running the npm run render command. */ | |
embed: true, /* ignore all chunking and include all images, css, JSON, JS and other assests into a single file. Great for CMS */ | |
bower: true, /* search for bower components as well.*/ | |
commonsChunk: true, /* Split code in multiple chunks to allow the user to only download code that is used on that page. */ | |
longTermCaching: false, /* Add a hash to the file name. Unless the hash changes, the browser wont download it again. */ | |
separateStylesheet: false, /* Separate CSS from JS. default: false. This means less files to download separately and allow hot swapping to work for CSS. */ | |
minimize: false, /* Minify code. Default for production build is true. */ | |
devtool: "cheap-module-eval-source-map", /* Create source maps. Dev source maps build only what is needed. Production source maps go into the /build folder by deafult so they are never deployed to the end-users. */ | |
devServer: |
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
var globals = { | |
React: 'react', | |
ReactDom: 'react-dom', | |
ReactRouter: 'react-router' | |
} | |
... | |
{ | |
entry: { | |
app: ['./src/bootstrap.js'], |
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
let { Router, Route } = ReactRouter; | |
let App = require('App'); | |
// routes | |
var routes = { | |
path: '/', | |
component: App, | |
onEnter: (router, replaceWith) => { | |
if (router.location.pathname === '/') { | |
replaceWith(null, '/one'); |
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
<html> | |
<body> | |
<div id="app"></div> | |
<script src="//fb.me/react-0.14.3.js"></script> | |
<script src="//fb.me/react-dom-0.14.3.js"></script> | |
<script> | |
var el = React.createElement; | |
var myView = React.createClass({ | |
render: function(){ | |
return el('h1', {color:'#F00'}, "Hello React"); |
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
/* Basic element to show the state of a single bank connection */ | |
createView({ | |
contextTypes: { | |
triforce: React.PropTypes.object.isRequired | |
}, | |
getDefaultProps: function(){ | |
return {bank: {}}; | |
}, | |
getInitialState: function(){ |
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
FROM library/node | |
MAINTAINER bobby@levelmoney.com | |
RUN mkdir /.npm | |
RUN mkdir /app | |
# cache (and skip if no changes) to the node_modules | |
WORKDIR /.npm | |
ADD package.json /.npm/package.json | |
# Set the version in the cache folder to 0. |