Skip to content

Commit

Permalink
get rid of async dependency (#3026)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored and Lucas Wojciechowski committed Aug 18, 2016
1 parent dc81c54 commit e451335
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 10 additions & 10 deletions bench/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var React = require('react');
var ReactDOM = require('react-dom');
var util = require('../js/util/util');
var async = require('async');
var mapboxgl = require('../js/mapbox-gl');
var Clipboard = require('clipboard');
var URL = require('url');
Expand Down Expand Up @@ -116,15 +115,16 @@ var BenchmarksView = React.createClass({

componentDidMount: function() {
var that = this;
setTimeout(function() {
async.eachSeries(
Object.keys(that.props.benchmarks),
that.runBenchmark,
function() {
that.setState({state: 'ended'});
that.scrollToBenchmark(Object.keys(that.props.benchmarks)[0]);
}
);
var benchmarks = Object.keys(that.props.benchmarks);

setTimeout(function next() {
var bench = benchmarks.shift();
if (!bench) return;
that.scrollToBenchmark(bench);
that.runBenchmark(bench, function () {
that.setState({state: 'ended'});
next();
});
}, 500);
},

Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"whoots-js": "^2.0.0"
},
"devDependencies": {
"async": "^2.0.1",
"babel-preset-react": "^6.11.1",
"babelify": "^7.3.0",
"benchmark": "~2.1.0",
Expand Down Expand Up @@ -74,7 +73,6 @@
"sinon": "^1.15.4",
"st": "^1.0.0",
"tap": "^5.7.0",
"through": "^2.3.7",
"transform-loader": "^0.2.3",
"unist-util-visit": "1.1.0",
"vinyl": "1.1.1",
Expand Down

0 comments on commit e451335

Please sign in to comment.