-
-
Save akre54/4a6116938e76d4701a0b to your computer and use it in GitHub Desktop.
d3-selection crash
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
Show hidden characters
{ | |
"presets": ["es2015"] | |
} |
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
<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> |
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 { selectAll } from 'd3-selection' | |
const data = [ | |
'a', | |
'b', | |
'c', | |
'd' | |
] | |
selectAll('p') | |
.data(data) |
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
{ | |
"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" | |
} | |
} |
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 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