move import list out of loop to accelerate build process

This commit is contained in:
Jonathan Rainville 2018-04-09 16:29:49 -04:00
parent f37b09a371
commit 3ecb195b38
1 changed files with 17 additions and 16 deletions

View File

@ -26,14 +26,6 @@ class Pipeline {
self.buildWeb3JS(function() { self.buildWeb3JS(function() {
// limit:1 due to issues when downloading required files such as web3.js
async.eachOfLimit(self.assetFiles, 1, function (files, targetFile, cb) {
// limit:1 due to issues when downloading required files such as web3.js
async.mapLimit(files, 1,
function(file, fileCb) {
self.logger.trace("reading " + file.filename);
if (file.filename.indexOf('.js') >= 0) {
let importsList = {}; let importsList = {};
importsList["Embark/EmbarkJS"] = fs.dappPath(".embark", 'embark.js'); importsList["Embark/EmbarkJS"] = fs.dappPath(".embark", 'embark.js');
@ -51,6 +43,15 @@ class Pipeline {
importsList["Embark/contracts/" + contractName] = filePath; importsList["Embark/contracts/" + contractName] = filePath;
} }
// limit:1 due to issues when downloading required files such as web3.js
async.eachOfLimit(self.assetFiles, 1, function (files, targetFile, cb) {
// limit:1 due to issues when downloading required files such as web3.js
async.mapLimit(files, 1,
function(file, fileCb) {
self.logger.trace("reading " + file.filename);
if (file.filename.indexOf('.js') >= 0) {
let realCwd; let realCwd;
async.waterfall([ async.waterfall([