Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX-218] Expose cli to be used programmatically #722

Merged
merged 5 commits into from
Oct 24, 2017
Merged

[DX-218] Expose cli to be used programmatically #722

merged 5 commits into from
Oct 24, 2017

Conversation

nickbalestra
Copy link
Contributor

@nickbalestra nickbalestra commented Oct 23, 2017

Fixes #441 by exposing the dev interface and allowing acceptance testing in a cleaner way

src/index.js Outdated
require(`./cli/facade/${cmd}.js`)(dependencies)(opts, cb);
}

module.exports.cli = cliCommand;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move lines 3-14 to own file inside the cli folder?

src/index.js Outdated
function cliCommand(cmd, options, cb) {
const dependencies = {
local: new Local(),
logger: options.logger || { log() {} }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/index.js Outdated
@@ -1,4 +1,8 @@
'use strict';

const _ = require('lodash');
const Local = require('./cli/domain/local');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot about those 2 ^ ? Everything else LGTM

@nickbalestra
Copy link
Contributor Author

nickbalestra commented Oct 24, 2017

@matteofigus
Fixed, there also were some faulty paths, and I've also added some unit tests. Should be good to review now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants