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

Commit

Permalink
Call method 'cli' instead of module directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jblandry committed May 23, 2017
1 parent 8fbbb87 commit 8ddc8fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@ module.exports = class Cli {

if (task) {
if (STATIC.tasks.list.includes(task)) {
require(`${STATIC.tasks.path}/${task.replace(/:/g, '/')}`)(meowCli); // eslint-disable-line global-require
require(`${STATIC.tasks.path}/${task.replace(/:/g, '/')}`).cli(meowCli); // eslint-disable-line global-require
} else {
meowCli.showHelp();
}
} else {
require(`${STATIC.tasks.path}/default`)(meowCli); // eslint-disable-line global-require
require(`${STATIC.tasks.path}/default`).cli(meowCli); // eslint-disable-line global-require
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@absolunet/cli",
"version": "0.3.0",
"version": "0.4.0",
"description": "CLI utilities",
"definition": "",
"homepage": "https://github.com/absolunet/node-cli",
Expand All @@ -10,7 +10,7 @@
"repository": { "url": "git://github.com/absolunet/node-cli.git", "type":"git" },
"bugs": { "url": "https://github.com/absolunet/node-cli/issues" },

"engines": { "node": ">= 7.9.0" },
"engines": { "node": ">= 7.10.0" },
"scripts": {
"test": "mocha"
},
Expand All @@ -21,7 +21,7 @@

"dependencies": {
"chalk": "^1.1.3",
"glob": "^7.1.1",
"glob": "^7.1.2",
"indent-string": "^3.1.0",
"omelette": "^0.3.2",
"read-pkg-up": "^2.0.0",
Expand Down

0 comments on commit 8ddc8fd

Please sign in to comment.