Skip to content

Commit

Permalink
Update: Replace async dependency with now-and-later (closes #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 17, 2017
1 parent 261f337 commit 123d5c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var path = require('path');

var fs = require('graceful-fs');
var File = require('vinyl');
var async = require('async');
var convert = require('convert-source-map');
var fileNormalize = require('file-normalize');
var nal = require('now-and-later');

var stripBom = fileNormalize.stripBOM;
var appendBuffer = fileNormalize.appendBuffer;
Expand Down Expand Up @@ -76,7 +76,7 @@ function fixImportedSourceMap(file, state, callback) {

state.map.sourcesContent = state.map.sourcesContent || [];

async.eachOf(state.map.sources, normalizeSourcesAndContent, callback);
nal.map(state.map.sources, normalizeSourcesAndContent, callback);

function assignSourcesContent(sourceContent, idx) {
state.map.sourcesContent[idx] = sourceContent;
Expand Down Expand Up @@ -152,7 +152,11 @@ function addSourceMaps(file, state, callback) {
mapsLoaded,
];

async.applyEachSeries(tasks, file, state, done);
function apply(fn, key, cb) {
fn(file, state, cb);
}

nal.mapSeries(tasks, apply, done);

function done(err) {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"coveralls": "npm run cover && istanbul-coveralls"
},
"dependencies": {
"async": "^2.1.4",
"convert-source-map": "^1.5.0",
"file-normalize": "^1.1.0",
"graceful-fs": "^4.1.6",
"now-and-later": "^2.0.0",
"object.defaults": "^1.0.0",
"vinyl": "^2.0.0"
},
Expand Down

0 comments on commit 123d5c4

Please sign in to comment.