Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from segmentio/fix-exports-flag
Browse files Browse the repository at this point in the history
Fix exports flag
  • Loading branch information
jeroenransijn authored Apr 12, 2018
2 parents 8f9c9e0 + bbe991b commit a9dfac2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ async function main() {
return
}

if (inputPackages.length > 0) {
if (inputPackages.length > 0 && inputExports.length > 0) {
spinner = ora().start(
`Search for packages: ${inputPackages}. With exports: ${inputExports}`
)
} else if (inputPackages.length > 0) {
spinner = ora().start(`Search for packages: ${inputPackages}`)
} else if (inputExports.length > 0) {
spinner = ora().start(`Search for exports: ${inputExports}`)
Expand Down Expand Up @@ -82,8 +86,7 @@ async function main() {

if (packages.length > 0) {
if (cli.flags.exports) {
const result = packages.map(pack => pack.toPlainObject())
// Const result = packages.map(pack => pack.exportReport(inputExports)
const result = packages.map(pack => pack.exportReport(inputExports))
console.log(toJSON(result))
} else {
const result = packages.map(pack => pack.toPlainObject())
Expand Down

0 comments on commit a9dfac2

Please sign in to comment.