mirror of https://github.com/embarklabs/embark.git
add new events for output generation and first deployment
This commit is contained in:
parent
a797f8fcf6
commit
8325943bd7
|
@ -277,6 +277,9 @@ This call is used to listen and react to events that happen in Embark such as co
|
|||
a file change, args is (filetype, path)
|
||||
* "abi", "abi-vanila", "abi-contracts-vanila" - triggered when contracts
|
||||
have been deployed and returns the generated JS code
|
||||
* "outputDone" - triggered when dapp is (re)generated
|
||||
* "firstDeploymentDone" - triggered when the dapp is deployed and generated
|
||||
for the first time
|
||||
|
||||
.. code:: javascript
|
||||
|
||||
|
|
|
@ -74,11 +74,13 @@ Engine.prototype.pipelineService = function(options) {
|
|||
this.events.on('abi', function(abi) {
|
||||
self.currentAbi = abi;
|
||||
pipeline.build(abi);
|
||||
self.events.emit('outputDone');
|
||||
});
|
||||
this.events.on('file-event', function(fileType, path) {
|
||||
if (fileType === 'asset') {
|
||||
self.config.reloadConfig();
|
||||
pipeline.build(self.abi, path);
|
||||
self.events.emit('outputDone');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -127,6 +127,7 @@ var Embark = {
|
|||
engine.logger.setStatus("Ready".green);
|
||||
engine.logger.info("Looking for documentation? you can find it at ".cyan + "http://embark.readthedocs.io/".green.underline);
|
||||
engine.logger.info("Ready".underline);
|
||||
engine.events.emit('firstDeploymentDone');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue