Skip to content

Instantly share code, notes, and snippets.

@lingo
Created August 20, 2017 11:32
Show Gist options
  • Save lingo/7a19356d5afc3779c85abe4b5a1c710c to your computer and use it in GitHub Desktop.
Save lingo/7a19356d5afc3779c85abe4b5a1c710c to your computer and use it in GitHub Desktop.
{
"name": "fakeeh",
"version": "0.1.0",
"private": true,
"dependencies": {
"bcrypt": "^1.0.1",
"body-parser": "^1.17.2",
"express": "^4.15.4",
"jsonwebtoken": "^7.2.1",
"material-ui": "^0.19.0",
"mongoose": "^4.11.7",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-router": "^3.0.0",
"react-vote": "^3.1.2",
"react-tap-event-plugin": "^2.0.1",
"react-scripts": "1.0.11",
"validator": "^6.2.0"
},
"devDependencies": {
"babel": "^6.23.0",
"babel-core": "^6.26.0",
"babel-loader": "^6.4.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"nodemon": "^1.11.0",
"webpack": "^3.5.5"
},
"scripts": {
"start": "nodemon --use_strict index.js",
"bundle": "webpack"
},
"description": "This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).",
"main": "index.js",
"author": "",
"license": "ISC"
}
import React from 'react';
import ReactDom from 'react-dom';
import injectTapEventPlugin from 'react-tap-event-plugin';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { browserHistory, Router } from 'react-router';
// import routes from './routes.js';
// remove tap delay
injectTapEventPlugin();
ReactDOM.render(
<MuiThemeProvider muiTheme={getMuiTheme()}>
<Router history={browserHistory} routes={routes} />
</MuiThemeProvider>,
document.getElementById('react-app'));
const path = require('path');
module.exports = {
// the entry file for the bundle
entry: path.join(__dirname, 'test.jsx'),
// the bundle file we will get in the result
output: {
path: path.join(__dirname, 'dist'),
filename: 'app.js',
},
module: {
// apply loaders to files that meet given conditions
loaders: [{
test: /\.jsx?$/,
include: path.join(__dirname, './'),
exclude: ['node_modules/'],
loader: 'babel-loader',
query: {
presets: ["react", "es2015"]
}
}],
},
// start Webpack in a watch mode, so Webpack will rebuild the bundle on changes
watch: true
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment