2017-12-27 00:55:42 +00:00
|
|
|
let UploadSwarm = require('./upload.js');
|
|
|
|
|
|
|
|
class Swarm {
|
|
|
|
|
|
|
|
constructor(embark, options) {
|
|
|
|
this.logger = embark.logger;
|
|
|
|
|
|
|
|
this.upload_swarm = new UploadSwarm({
|
|
|
|
buildDir: options.buildDir || 'dist/',
|
2018-04-24 00:27:11 +00:00
|
|
|
storageConfig: options.storageConfig,
|
|
|
|
web3: options.web3
|
2017-12-27 00:55:42 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
embark.registerUploadCommand('swarm', this.upload_swarm.deploy.bind(this.upload_swarm));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Swarm;
|
|
|
|
|