mirror of https://github.com/embarklabs/embark.git
move import list out of loop to accelerate build process
This commit is contained in:
parent
f37b09a371
commit
3ecb195b38
|
@ -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([
|
||||||
|
|
Loading…
Reference in New Issue