From 097088821b41c89ba8a5fb1b6771706e98b33017 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 15 Feb 2017 19:27:23 -0500 Subject: [PATCH] support generating abi file only --- lib/config.js | 5 ++++- lib/pipeline.js | 2 ++ test_app/embark.json | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index b89672532..b017291db 100644 --- a/lib/config.js +++ b/lib/config.js @@ -198,8 +198,11 @@ Config.prototype.loadFiles = function(files) { }).filter(function(file) { if (file === 'embark.js') { return; + } else if (file === 'abi.js') { + readFiles.push({filename: file, content: "", path: file}); + } else { + readFiles.push({filename: file, content: fs.readFileSync(file).toString(), path: file}); } - readFiles.push({filename: file, content: fs.readFileSync(file).toString(), path: file}); }); return readFiles; diff --git a/lib/pipeline.js b/lib/pipeline.js index 517208ae4..13e5ddb4b 100644 --- a/lib/pipeline.js +++ b/lib/pipeline.js @@ -21,6 +21,8 @@ Pipeline.prototype.build = function(abi) { if (file.filename === 'embark.js') { return {content: file.content + "\n" + abi, filename: file.filename, path: file.path, modified: true}; + } else if (file.filename === 'abi.js') { + return {content: abi, filename: file.filename, path: file.path, modified: true}; } else if (['web3.js', 'ipfs.js', 'ipfs-api.js', 'orbit.js'].indexOf(file.filename) >= 0) { file.modified = true; return file; diff --git a/test_app/embark.json b/test_app/embark.json index 731b6063f..3f5136de0 100644 --- a/test_app/embark.json +++ b/test_app/embark.json @@ -4,6 +4,7 @@ "css/app.css": ["app/css/**"], "images/": ["app/images/**"], "js/app.js": ["embark.js", "app/js/_vendor/jquery.min.js", "app/js/_vendor/bootstrap.min.js", "app/js/**"], + "js/abi.js": "abi.js", "index.html": "app/index.html", "test.html": "app/test.html" },