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
... | |
// Build your configuration object, and then return a Promise | |
let finalConfig = { | |
devtool: 'eval', | |
output: { /* your configuration */ }, | |
plugins: [ /* your configuration */ ] | |
}; |
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 BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const prodBuild = require('./webpack.config.prod.js'); | |
module.exports = new Promise(resolve => { | |
prodBuild.then(build => { | |
build.plugins.push(new BundleAnalyzerPlugin()); | |
resolve(build); | |
}); | |
}); |
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 webpack = require('webpack'); | |
const path = require('path'); | |
const ROOT_PATH = path.resolve(process.env.PWD); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const UGLIFY_WHITELIST = require('./uglifyWhitelist.json'); | |
require('babel-polyfill'); |
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 webpack = require('webpack'); | |
const path = require('path'); | |
const ROOT_PATH = path.resolve(process.env.PWD); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const UGLIFY_WHITELIST = require('./uglifyWhitelist.json'); | |
require('babel-polyfill'); |
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 DebugInspector from 'ringa-fw-react/src/components/debugInspector/DebugInspector'; | |
import Theme from 'ringa-fw-react/src/components/containers/Theme'; | |
... | |
render() { | |
return <Theme> | |
{this.props.children} // The rest of your application... | |
<DebugInspector /> | |
</Theme>; | |
} |
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 the game 2048, the board consists of a 2-dimensional array of values. | |
* | |
* Every tile will always be a power of 2, starting with 2. | |
* | |
* The player can swipe left, up, right, or down. When this happens the numbers | |
* "collapse" in that direction. Duplicate values merge into a single tile and | |
* after swiping all non-zero values should have shifted in that direction. | |
* | |
* NOTE! A maximum of 2 tiles can merge at a time! So if you have a row of [4, 4, 2, 2] |
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
window.Game2048 = function () { | |
this.cells = []; | |
this.boardValues = [ | |
[0, 0, 0, 0], | |
[2, 0, 0, 0], | |
[0, 0, 0, 0], | |
[0, 2, 0, 0]]; | |
this.board = [[{}, {}, {}, {}], | |
[{}, {}, {}, {}], |