Skip to content

Commit

Permalink
starter for module loading of components
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Tettenborn committed Dec 18, 2015
1 parent ddd6974 commit cce8e88
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015","react"]
}
8 changes: 6 additions & 2 deletions examples/bar-chart/App.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
var hello = 'hello';
document.getElementById('root').innerHTML = `${hello} BARCHART`;
import React from 'react';
import ReactDOM from 'react-dom';

import BarChart from 'rc-d3/bar-chart';

ReactDOM.render(<BarChart />, document.getElementById('root'));
2 changes: 0 additions & 2 deletions examples/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*eslint-disable no-console, no-var */
'use strict';

const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config');
Expand Down
6 changes: 6 additions & 0 deletions modules/bar-chart/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export default class BarChart extends React.Component {
render() {
return <div>Bar Chart</div>;
}
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@
"open": "0.0.5",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
},
"dependencies": {
"react": "^0.14.3",
"react-dom": "^0.14.3"
}
}

0 comments on commit cce8e88

Please sign in to comment.