Skip to content

Instantly share code, notes, and snippets.

@akre54

akre54/.babelrc Secret

Last active December 4, 2015 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akre54/4a6116938e76d4701a0b to your computer and use it in GitHub Desktop.
Save akre54/4a6116938e76d4701a0b to your computer and use it in GitHub Desktop.
d3-selection crash
{
"presets": ["es2015"]
}
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<p></p>
<p></p>
<p></p>
<p></p>
</div>
<script src="dist/app.js"></script>
</body>
</html>
import { selectAll } from 'd3-selection'
const data = [
'a',
'b',
'c',
'd'
]
selectAll('p')
.data(data)
{
"name": "d3-selection-test",
"dependencies": {
"babel-core": "^6.3.13",
"d3-selection": "^0.4.12"
},
"devDependencies": {
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.3.13",
"webpack": "^1.12.9"
}
}
const path = require('path')
const webpack = require('webpack')
const config = module.exports = {
// devtool: 'eval',
entry: [
path.resolve(__dirname, './index.js')
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'app.js',
publicPath: '/'
},
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel']
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment