support generating abi file only

This commit is contained in:
Iuri Matias 2017-02-15 19:27:23 -05:00
parent 40ddfff425
commit 097088821b
3 changed files with 7 additions and 1 deletions

View File

@ -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});
}
});
return readFiles;

View File

@ -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;

View File

@ -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"
},