Skip to content

React 16.8 and greater #28

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"presets": [
"es2015",
"react"
"@babel/preset-env", "@babel/preset-react"
]
}
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"jsxBracketSameLine": true,
"trailingComma": "es5",
"tabWidth": 2
}
369 changes: 131 additions & 238 deletions dist/anychart-react.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/anychart-react.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 1 addition & 69 deletions examples/chart_with_json/chart_with_json.min.js

Large diffs are not rendered by default.

70 changes: 1 addition & 69 deletions examples/charts_with_controls/charts_with_controls.min.js

Large diffs are not rendered by default.

70 changes: 1 addition & 69 deletions examples/choropleth_map/choropleth_map.min.js

Large diffs are not rendered by default.

70 changes: 1 addition & 69 deletions examples/data_streaming/data_streaming.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

70 changes: 1 addition & 69 deletions examples/simple_dashboard/simple_dashboard.min.js

Large diffs are not rendered by default.

70 changes: 1 addition & 69 deletions examples/stock/stock.min.js

Large diffs are not rendered by default.

71 changes: 1 addition & 70 deletions examples/tabs/tabs.min.js

Large diffs are not rendered by default.

79 changes: 42 additions & 37 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,80 @@ var uglify = require('gulp-uglify');
var source = require('vinyl-source-stream');
process.env.NODE_ENV = 'production';

gulp.task('prod', function() {
return gulp.src('./src/anychart-react.jsx')
.pipe(babel({
presets: ['es2015', 'react']
}))
gulp.task('prod', function () {
return gulp
.src('./src/anychart-react.jsx')
.pipe(babel())
.pipe(uglify())
.pipe(rename('anychart-react.min.js'))
.pipe(gulp.dest('./dist/'));
});

gulp.task('dev', function() {
return gulp.src('./src/anychart-react.jsx')
.pipe(babel({
presets: ['es2015', 'react']
}))
gulp.task('dev', function () {
return gulp
.src('./src/anychart-react.jsx')
.pipe(babel())
.pipe(rename('anychart-react.js'))
.pipe(gulp.dest('./dist/'));
});

gulp.task('default', ['dev', 'prod']);
gulp.task('default', gulp.parallel(['dev', 'prod']));

/*
* Tasks for examples.
*/

var pipeline = function(name) {
browserify({
entries: ['./examples/src/' + name + '.js'],
transform: [
["babelify", {"presets": ["es2015", "react"]}]
]
})
const pipeline = function (name) {
return browserify(`./examples/src/${name}.js`)
.transform('babelify')
.bundle()
.pipe(source(name + '.min.js'))
.pipe(streamify(uglify()))
.pipe(gulp.dest('./examples/' + name))
.pipe(gulp.dest('./examples/' + name));
};

gulp.task('chart_with_json', function() {
pipeline('chart_with_json')
gulp.task('chart_with_json', function () {
return pipeline('chart_with_json');
});

gulp.task('multiseries_column_chart', function() {
pipeline('multiseries_column_chart')
gulp.task('multiseries_column_chart', function () {
return pipeline('multiseries_column_chart');
});

gulp.task('charts_with_controls', function() {
pipeline('charts_with_controls')
gulp.task('charts_with_controls', function () {
return pipeline('charts_with_controls');
});

gulp.task('choropleth_map', function() {
pipeline('choropleth_map')
gulp.task('choropleth_map', function () {
return pipeline('choropleth_map');
});

gulp.task('data_streaming', function() {
pipeline('data_streaming')
gulp.task('data_streaming', function () {
return pipeline('data_streaming');
});

gulp.task('simple_dashboard', function() {
pipeline('simple_dashboard')
gulp.task('simple_dashboard', function () {
return pipeline('simple_dashboard');
});

gulp.task('stock', function() {
pipeline('stock')
gulp.task('stock', function () {
return pipeline('stock');
});

gulp.task('tabs', function() {
pipeline('tabs')
gulp.task('tabs', function () {
return pipeline('tabs');
});

var allExamples = ['chart_with_json', 'charts_with_controls', 'choropleth_map', 'data_streaming', 'multiseries_column_chart', 'simple_dashboard', 'stock', 'tabs'];
gulp.task('examples', allExamples);
gulp.task(
'examples',
gulp.series([
'chart_with_json',
'charts_with_controls',
'choropleth_map',
'data_streaming',
'multiseries_column_chart',
'simple_dashboard',
'stock',
'tabs',
])
);
Loading