mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
addFileToPipeline test and registerBeforeDeploy with new arg
This commit is contained in:
parent
c818326f2e
commit
61be2c7bd7
@ -280,17 +280,17 @@ class Deploy {
|
||||
|
||||
// calling each beforeDeploy handler declared by the plugin
|
||||
async.eachSeries(plugin.beforeDeploy, (beforeDeployFn, eachCb) => {
|
||||
function beforeDeployCb(resObj){
|
||||
contract.code = resObj.contractCode;
|
||||
eachCb();
|
||||
}
|
||||
beforeDeployFn({
|
||||
embarkDeploy: self,
|
||||
pluginConfig: plugin.pluginConfig,
|
||||
deploymentAccount: deploymentAccount,
|
||||
contract: contract,
|
||||
callback:
|
||||
(function(resObj){
|
||||
contract.code = resObj.contractCode;
|
||||
eachCb();
|
||||
})
|
||||
});
|
||||
callback: beforeDeployCb
|
||||
}, beforeDeployCb);
|
||||
}, () => {
|
||||
//self.logger.info('All beforeDeploy handlers of the plugin has processed.');
|
||||
eachPluginCb();
|
||||
|
@ -286,7 +286,7 @@ Config.prototype.loadFiles = function(files) {
|
||||
}
|
||||
});
|
||||
filesFromPlugins.filter(function(file) {
|
||||
if (utils.fileMatchesPattern(files, file.intendedPath)) {
|
||||
if ((file.intendedPath && utils.fileMatchesPattern(files, file.intendedPath)) || utils.fileMatchesPattern(files, file.file)) {
|
||||
readFiles.push(file);
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1 @@
|
||||
console.log('File added to the pipeline using embark.addFileToPipeline');
|
@ -19,4 +19,12 @@ module.exports = function (embark) {
|
||||
}
|
||||
});
|
||||
embark.addContractFile("./contracts/pluginSimpleStorage.sol");
|
||||
|
||||
embark.addFileToPipeline('./fileInPipeline.js');
|
||||
embark.addFileToPipeline('./fileInPipeline.js', 'js/fileInPipeline.js');
|
||||
|
||||
embark.registerBeforeDeploy(function(options, callback) {
|
||||
// Just calling register to prove it works. We don't actually want to change the contracts
|
||||
callback({contractCode: options.contract.code});
|
||||
});
|
||||
};
|
||||
|
@ -14,7 +14,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "^3.3.6",
|
||||
"embark-service": "./extensions/embark-service",
|
||||
"embark-service": "file:extensions/embark-service",
|
||||
"jquery": "^1.11.3",
|
||||
"react": "^16.0.0",
|
||||
"react-bootstrap": "^0.32.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user