Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Commit

Permalink
fix: fix name abi-to-script to gen-script, BREAKING CHANGE
Browse files Browse the repository at this point in the history
  • Loading branch information
JhChoy committed Mar 3, 2019
1 parent 9f86870 commit 0544b00
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const { abiToScript } = require('../scripts');
const { genScript } = require('../scripts');

const name = 'abi-to-script';
const name = 'gen-script';
const signature = `${name} <files...>`;
const description = `generate javascript libraries communicating the smart contracts`;

const register = commander =>
commander
.command(signature, { noHelp: true })
.usage('<files...> [options]')
.option('-f, --front <name>', 'generate the front-end library')
.option('-f, --front <name>', 'generate the front-end javascript library')
.description(description)
.action(abiToScript)
.action(genScript)
.addCustomConfigOption();

module.exports = { name, signature, description, register, abiToScript };
module.exports = { name, signature, description, register, genScript };
12 changes: 6 additions & 6 deletions packages/vvisp/commands/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const abiToScript = require('./abi-to-script.js');
const compile = require('./compile');
const console = require('./console');
const deployContract = require('./deploy-contract');
const deployService = require('./deploy-service');
const init = require('./init');
const flatten = require('./flatten');
const console = require('./console');
const genScript = require('./gen-script.js');
const init = require('./init');

module.exports = [
abiToScript,
compile,
console,
deployContract,
deployService,
init,
flatten,
console
genScript,
init
];
4 changes: 2 additions & 2 deletions packages/vvisp/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const abiToScript = require('./abi-to-script');
const genScript = require('./gen-script');
const compile = require('./compile');
const deployService = require('./deploy-service');
const deployContract = require('./deploy-contract');
Expand All @@ -7,7 +7,7 @@ const flatten = require('./flatten');
const console = require('./console');

module.exports = {
abiToScript,
genScript,
compile,
deployService,
deployContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ chai.use(require('chai-as-promised')).should();

const path = require('path');
const fs = require('fs-extra');
const abiToScript = require('../../../scripts/abi-to-script');
const _ = require('lodash');
const genScript = require('../../../scripts/gen-script');

const {
compileAndDeploy,
Expand All @@ -29,7 +28,7 @@ const config = Config.get();
const PRIV_KEY = config.from;
const SENDER = privateKeyToAddress(PRIV_KEY);

describe('# abi-to-script process test', function() {
describe('# gen-script process test', function() {
this.timeout(50000);
let web3;

Expand All @@ -56,7 +55,7 @@ describe('# abi-to-script process test', function() {
});

it('should be fulfilled', async function() {
await abiToScript(this.files, { silent: true }).should.be.fulfilled;
await genScript(this.files, { silent: true }).should.be.fulfilled;
});

it('should make all directories', function() {
Expand Down Expand Up @@ -190,7 +189,7 @@ describe('# abi-to-script process test', function() {
});

it('should be fulfilled', async function() {
await abiToScript(this.files, { silent: true, front: this.name }).should
await genScript(this.files, { silent: true, front: this.name }).should
.be.fulfilled;
});

Expand Down

0 comments on commit 0544b00

Please sign in to comment.