diff --git a/commands/details.js b/commands/details.js index 825adfb..98ee594 100644 --- a/commands/details.js +++ b/commands/details.js @@ -158,8 +158,12 @@ async function details (argv, arg1, arg2, arg3) { } } - moduleReport(report) - if (hasFailures) process.exitCode = 1 + if (argv.isPlugin) { + return report + } else { + moduleReport(report) + if (hasFailures) process.exitCode = 1 + } } function printHelp () { diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..e84acf5 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = { + details: require('../commands/details') +} diff --git a/package.json b/package.json index ff50dbb..0e46fd8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "ncm-cli", - "version": "1.4.0", + "version": "1.4.1", "license": "Apache-2.0", + "main": "lib/index.js", "description": "Command-line tool for NodeSource Certified Modules 2.0", "author": "NodeSource (https://nodesource.com)", "contributors": [