Browse Source

Cli parameters standarized to C

feature/witness_bin
Jordi Baylina 6 years ago
parent
commit
49a6120eeb
No known key found for this signature in database GPG Key ID: 7480C80C1BE43112
2 changed files with 9 additions and 9 deletions
  1. +4
    -5
      cli.js
  2. +5
    -4
      package-lock.json

+ 4
- 5
cli.js

@ -30,10 +30,8 @@ const version = require("./package").version;
const argv = require("yargs")
.version(version)
.usage("circom -s [input source circuit file] -o [output definition circuit file]")
.alias("s", "source")
.usage("circom [input source circuit file] -o [output definition circuit file]")
.alias("o", "output")
.require(["s","o"])
.help("h")
.alias("h", "help")
.epilogue(`Copyright (C) 2018 0kims association
@ -43,10 +41,11 @@ const argv = require("yargs")
repo directory at https://github.com/iden3/circom `)
.argv;
const fullFileName = path.resolve(process.cwd(), argv.source);
const fullFileName = path.resolve(process.cwd(), argv._[0]);
const outName = argv.output ? argv.output : "circuit.json";
compiler(fullFileName).then( (cir) => {
fs.writeFileSync(argv.output, JSON.stringify(cir, null, 1), "utf8");
fs.writeFileSync(outName, JSON.stringify(cir, null, 1), "utf8");
}, (err) => {
console.log(err);
console.error(`ERROR at ${err.errFile}:${err.pos.first_line},${err.pos.first_column}-${err.pos.last_line},${err.pos.last_column} ${err.errStr}`);

+ 5
- 4
package-lock.json

@ -1469,14 +1469,15 @@
}
},
"snarkjs": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.1.0.tgz",
"integrity": "sha512-i+OOKwATef3/oUleae9FHt/qACPYH1M5gjQkdYYkyRYqScIuZHCmNSf6Q5RWJT5hmOkTEor+T2C5qwKSrzzGSg==",
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.1.3.tgz",
"integrity": "sha512-z5HhuNt019ZzNzUztETK31rpjRRSz3Uzy8TjGgSROf+9ZT9i6dbdWkjTC3fh5o9H+R/2+hcR+7IKAmpIR56V+A==",
"dev": true,
"requires": {
"big-integer": "^1.6.35",
"chai": "^4.1.2",
"eslint": "^5.3.0"
"eslint": "^5.3.0",
"yargs": "^12.0.2"
},
"dependencies": {
"ajv": {

Loading…
Cancel
Save