Skip to content
Permalink
Browse files

boilerplate react app with mapd libraries

  • Loading branch information...
smooth-e committed May 24, 2017
0 parents commit 03491842d676fdc268f0bdb53d4dadb0a50d48b9
Showing with 3,393 additions and 0 deletions.
  1. +5 −0 .babelrc
  2. +2 −0 .gitignore
  3. +30 −0 package.json
  4. +12 −0 src/components/App.js
  5. +9 −0 src/components/Map.js
  6. +12 −0 src/index.html
  7. +5 −0 src/index.js
  8. +36 −0 webpack.config.js
  9. +3,282 −0 yarn.lock
@@ -0,0 +1,5 @@
{
"presets":[
"es2015", "stage-0", "react"
]
}
@@ -0,0 +1,2 @@
.DS_STORE
node_modules
@@ -0,0 +1,30 @@
{
"name": "tweetmap",
"version": "1.0.0",
"description": "MapD Tweetmap Demo",
"main": "index.js",
"license": "ISC",
"scripts": {
"start": "webpack-dev-server"
},
"dependencies": {
"html-webpack-plugin": "^2.28.0",
"path": "^0.12.7",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-redux": "^5.0.5",
"redux": "^3.6.0",
"redux-devtools": "^3.4.0",
"webpack": "^2.6.0",
"webpack-dev-server": "^2.4.5",
"@mapd/connector": "ssh://git@github.com/mapd/mapd-connector.git#develop",
"@mapd/crossfilter": "ssh://git@github.com/mapd/mapd-crossfilter.git#develop",
"@mapd/mapdc": "ssh://git@github.com/mapd/mapd-charting.git#develop"
},
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1"
}
}
@@ -0,0 +1,12 @@
import React from 'react';
import Map from './Map.js';

export default class App extends React.Component {
render() {
return (
<div style={{textAlign: 'center'}}>
<h1>MapD TweetMap</h1>
<Map/>
</div>);
}
}
@@ -0,0 +1,9 @@
import React from 'react';
import * as dc from '@mapd/mapdc'

export default class Map extends React.Component {
render() {
return (
<h1>This will be the map</h1>);
}
}
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>MapD Tweetmap</title>
</head>
<body>
<div id="root">

</div>
</body>
</html>
@@ -0,0 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App.js';

ReactDOM.render(<App />, document.getElementById('root'));
@@ -0,0 +1,36 @@
const path = require('path');

const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: './src/index.html',
filename: 'index.html',
inject: 'body'
})

module.exports = {
entry: './src/index.js',
output: {
path: path.resolve('dist'),
filename: 'index_bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
loader: "babel-loader",
include: [
path.resolve(__dirname, "src"),
path.resolve(__dirname, "node_modules/@mapd/mapdc")
]
},
{
test: /\.css$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" }
]
}
]
},
plugins: [HtmlWebpackPluginConfig]
}

0 comments on commit 0349184

Please sign in to comment.
You can’t perform that action at this time.