Skip to content

Commit

Permalink
Merge pull request #1292 from apiaryio/honzajavorek/options
Browse files Browse the repository at this point in the history
Require options where they're used
  • Loading branch information
honzajavorek committed Apr 1, 2019
2 parents e40f7c7 + 6617222 commit a3d103c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/CLI.js
Expand Up @@ -13,8 +13,10 @@ const logger = require('./logger');
const { applyLoggingOptions } = require('./configuration');
const { spawn } = require('./childProcess');

const dreddOptions = require('./options');
const packageData = require('../package.json');


class CLI {
constructor(options = {}, cb) {
this.cb = cb;
Expand Down Expand Up @@ -47,7 +49,7 @@ Or:
Example:
$ dredd ./api-description.apib http://127.0.0.1:3000 --dry-run\
`)
.options(Dredd.options)
.options(dreddOptions)
.wrap(80);

this.argv = this.optimist.argv;
Expand Down
3 changes: 1 addition & 2 deletions lib/Dredd.js
Expand Up @@ -13,7 +13,6 @@ const resolveLocations = require('./resolveLocations');
const logger = require('./logger');
const Runner = require('./TransactionRunner');
const { applyConfiguration } = require('./configuration');
const options = require('./options.json');


const PROXY_ENV_VARIABLES = ['HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY'];
Expand Down Expand Up @@ -251,5 +250,5 @@ Is the provided path correct?
}
}


module.exports = Dredd;
module.exports.options = options;

0 comments on commit a3d103c

Please sign in to comment.