Michael Bradley b736ebefcd refactor: initial steps toward 5.0.0-alpha.0 (#1856)
BREAKING CHANGE:

There are more than several breaking changes, including DApp configuration for
accounts.
2019-08-30 16:50:20 -04:00

44 lines
1.1 KiB
JavaScript

const Haml = require('haml');
module.exports = function (embark) {
// embark.registerServiceCheck('PluginService', function (cb) {
// cb({name: "ServiceName", status: "on"});
// });
embark.registerPipeline((embark.pluginConfig.files || ['**/*.haml']), function (opts) {
return Haml.render(opts.source);
});
embark.registerContractConfiguration({
"default": {
"deploy": {
"PluginStorage": {
"args": ["$SimpleStorage"]
}
}
}
});
embark.addContractFile("./contracts/pluginSimpleStorage.sol");
embark.addFileToPipeline('./fileInPipeline.js');
embark.addFileToPipeline('./fileInPipeline.js', 'js/fileInPipeline.js');
embark.registerActionForEvent("deploy:contract:beforeDeploy", (params, cb) => {
embark.logger.info("applying beforeDeploy plugin...");
cb();
});
embark.registerConsoleCommand({
matches: ["hello"],
description: 'Says Hello',
process: (cmd, callback) => {
callback(null, 'Hello there');
}
});
embark.events.on("contractsDeployed", function() {
embark.logger.info("plugin says:", ' your contracts have been deployed');
});
};