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 'awesome-transferwise-library'; | |
import 'bootstrap/dist/js/bootstrap'; | |
import 'bootstrap/dist/css/bootstrap.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
// ... | |
externals: { | |
moment: 'moment' | |
} | |
// ... |
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 Visualizer = require('webpack-visualizer-plugin'); | |
//... | |
plugins: [new Visualizer()], | |
//... |
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:4.3.1-wheezy | |
# Install app dependencies | |
COPY package.json /src/package.json | |
RUN cd /src; npm install --production | |
# Bundle app source | |
COPY . /src | |
EXPOSE 3000 | |
CMD ["node", "/src/server.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
var webpack = require('webpack'); | |
module.exports = { | |
entry: './public/js/render.jsx', | |
output: { | |
// Output the bundled file. | |
path: './public/build', | |
// Use the name specified in the entry key as name for the bundle file. | |
filename: 'bundle.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
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var reactify = require('reactify'); | |
var concat = require('gulp-concat'); | |
gulp.task('browserify', function() { | |
var bundler = browserify({ | |
entries: ['./public/js/render.jsx'], // Only need initial file, browserify finds the deps |
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 gulp = require('gulp'), | |
requireDir = require('require-dir'); | |
requireDir('./gulp'); | |
gulp.task('default', ['browserify']); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>React Tutorial</title> | |
<!-- Not present in the tutorial. Just for basic styling. --> | |
<link rel="stylesheet" href="css/base.css" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.js"></script> |
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
{ | |
"id": 123, | |
"name": "Awesome TV series", | |
"watched": false, | |
"children": [ | |
{ | |
"id": 4324, | |
"name": "Season 1", | |
"watched": false, | |
"children": [ |
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 recursivelyToggle = function recursivelyToggleChildren(array){ | |
var localArray = array; | |
for(var i=0;i<localArray.length;i++){ | |
var node = localArray[i]; | |
toggleFlag(node); // toggles the flag of the node. | |
if(node.children){ | |
node.children = recursivelyToggleChildren(node.children); | |
} |
NewerOlder