front-build
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -30,33 +30,40 @@ /** | ||
} | ||
fu.mkdirp(path.dirname(target), function(err){ | ||
if (err) { | ||
return callback(err); | ||
} | ||
var ws = fs.createWriteStream(target, { | ||
start: 0 | ||
}); | ||
var index = 0; | ||
var ws = fs.createWriteStream(target, { | ||
start: 0 | ||
}); | ||
var index = 0; | ||
async.forEachSeries( | ||
files, | ||
function(file, callback){ | ||
index += 1; | ||
fs.readFile(file, function(err, data){ | ||
var rs = fs.createReadStream(file); | ||
// write a LineEnd | ||
rs.on('end', function (ev) { | ||
ws.once('drain', callback); | ||
ws.write(lineEndBuf); | ||
async.forEachSeries( | ||
files, | ||
function(file, callback){ | ||
index += 1; | ||
fs.readFile(file, function(err, data){ | ||
var rs = fs.createReadStream(file); | ||
// write a LineEnd | ||
rs.on('end', function (ev) { | ||
ws.once('drain', callback); | ||
ws.write(lineEndBuf); | ||
}); | ||
rs.pipe(ws, {end: false}); | ||
}); | ||
rs.pipe(ws, {end: false}); | ||
}); | ||
}, | ||
}, | ||
function (err) { | ||
if (err) { | ||
return callback(err); | ||
function (err) { | ||
if (err) { | ||
return callback(err); | ||
} | ||
ws.end(); | ||
callback(null); | ||
} | ||
ws.end(); | ||
callback(null); | ||
} | ||
); | ||
); | ||
}); | ||
} | ||
@@ -63,0 +70,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "build front project", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -16,3 +16,3 @@ { | ||
}, | ||
"fbversion": "0.3.6" | ||
"fbversion": "0.3.7" | ||
} |
124941
3337