Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to 5 version D3 #156

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["es2015", "stage-0", "react"]
"presets": ["env", "stage-0", "react"]
}
9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ Let React have complete control over the DOM even when using D3. This way we can

## Installation
```
npm install react-d3-components
# for d3 version 5
npm install react-d3-components d3-array@1 d3-scale@2 d3-scale-chromatic@1 d3-shape@1

# for d3 version 3
npm install react-d3-components@0
```

## Development
Expand Down
27 changes: 27 additions & 0 deletions config/webpack.config.base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const path = require('path');

module.exports = {
entry: path.resolve(__dirname, '../src/index.jsx'),
output: {
library: 'ReactD3',
libraryTarget: 'umd',
path: path.resolve(__dirname, '../dist')
},
module: {
rules: [
{
test: /.jsx$/,
loader: 'babel-loader',
include: path.resolve(__dirname, '../src')
}
]
},
resolve: {
extensions: ['.js', '.jsx']
},
externals: {
d3: true,
react: 'React',
'react-dom': 'ReactDOM'
}
};
9 changes: 9 additions & 0 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const merge = require('webpack-merge');

module.exports = merge(require('./webpack.config.base'), {
mode: 'development',
devtool: 'eval',
output: {
filename: 'react-d3-components.js'
}
});
26 changes: 26 additions & 0 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const merge = require('webpack-merge');
const {
optimize: { OccurrenceOrderPlugin, AggressiveMergingPlugin }
} = require('webpack');

module.exports = merge(require('./webpack.config.base'), {
mode: 'production',
devtool: 'source-map',
output: {
filename: 'react-d3-components.min.js',
sourceMapFilename: 'react-d3-components.js.map'
},
plugins: [
new OccurrenceOrderPlugin(),
new AggressiveMergingPlugin(),
new UglifyJsPlugin({
sourceMap: true,
uglifyOptions: {
compress: {
warnings: false
}
}
})
]
});
3,112 changes: 2,988 additions & 124 deletions dist/react-d3-components.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react-d3-components.js.map

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions dist/react-d3-components.min.js

Large diffs are not rendered by default.

Loading