mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-25 21:18:51 +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
|
// calling each beforeDeploy handler declared by the plugin
|
||||||
async.eachSeries(plugin.beforeDeploy, (beforeDeployFn, eachCb) => {
|
async.eachSeries(plugin.beforeDeploy, (beforeDeployFn, eachCb) => {
|
||||||
|
function beforeDeployCb(resObj){
|
||||||
|
contract.code = resObj.contractCode;
|
||||||
|
eachCb();
|
||||||
|
}
|
||||||
beforeDeployFn({
|
beforeDeployFn({
|
||||||
embarkDeploy: self,
|
embarkDeploy: self,
|
||||||
pluginConfig: plugin.pluginConfig,
|
pluginConfig: plugin.pluginConfig,
|
||||||
deploymentAccount: deploymentAccount,
|
deploymentAccount: deploymentAccount,
|
||||||
contract: contract,
|
contract: contract,
|
||||||
callback:
|
callback: beforeDeployCb
|
||||||
(function(resObj){
|
}, beforeDeployCb);
|
||||||
contract.code = resObj.contractCode;
|
|
||||||
eachCb();
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}, () => {
|
}, () => {
|
||||||
//self.logger.info('All beforeDeploy handlers of the plugin has processed.');
|
//self.logger.info('All beforeDeploy handlers of the plugin has processed.');
|
||||||
eachPluginCb();
|
eachPluginCb();
|
||||||
|
@ -286,7 +286,7 @@ Config.prototype.loadFiles = function(files) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
filesFromPlugins.filter(function(file) {
|
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);
|
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.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": {
|
"dependencies": {
|
||||||
"bootstrap": "^3.3.6",
|
"bootstrap": "^3.3.6",
|
||||||
"embark-service": "./extensions/embark-service",
|
"embark-service": "file:extensions/embark-service",
|
||||||
"jquery": "^1.11.3",
|
"jquery": "^1.11.3",
|
||||||
"react": "^16.0.0",
|
"react": "^16.0.0",
|
||||||
"react-bootstrap": "^0.32.0",
|
"react-bootstrap": "^0.32.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user