Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boilerplate react app with mapd libraries
- Loading branch information
0 parents
commit 0349184
Showing
9 changed files
with
3,393 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets":[ | ||
"es2015", "stage-0", "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_STORE | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>MapD Tweetmap</title> | ||
</head> | ||
<body> | ||
<div id="root"> | ||
|
||
</div> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] | ||
} |
Oops, something went wrong.