diff --git a/lib/pipeline/pipeline.js b/lib/pipeline/pipeline.js index a7e7ace9..77f5eb20 100644 --- a/lib/pipeline/pipeline.js +++ b/lib/pipeline/pipeline.js @@ -97,10 +97,13 @@ class Pipeline { buildContractJS(contractName) { let contractJSON = fs.readFileSync('dist/contracts/' + contractName + '.json').toString(); + let EmbarkJSLib = fs.readFileSync(fs.embarkPath("js/embark.js")).toString(); let contractCode = ""; contractCode += contractName + "JSONConfig = " + contractJSON + ";\n"; + contractCode += EmbarkJSLib + "\n"; contractCode += contractName + " = new EmbarkJS.Contract(" + contractName + "JSONConfig);\n"; + contractCode += "module.exports = " + contractName + ";\n"; return contractCode; }