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

Commit

Permalink
Cleanup + Better tester
Browse files Browse the repository at this point in the history
  • Loading branch information
jblandry committed Jul 24, 2018
1 parent 603f1ae commit 8931b13
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extends: '@absolunet/eslint-config-node'
extends: '@absolunet/node'
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ module.exports = class Cli {
static refuseFlags(meowCli) {
owIsMeow(meowCli);

if (Object.keys(meowCli.flags).length) {
if (Object.keys(meowCli.flags).length !== 0) {
this.showTaskUsage(meowCli);
}
}
Expand All @@ -271,7 +271,7 @@ module.exports = class Cli {
static refuseFlagsAndArguments(meowCli) {
owIsMeow(meowCli);

if (meowCli.input.length > 1 || Object.keys(meowCli.flags).length) {
if (meowCli.input.length > 1 || Object.keys(meowCli.flags).length !== 0) {
this.showTaskUsage(meowCli);
}
}
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"name": "Absolunet",
"url": "https://absolunet.com"
},
"keywords": [
"cli"
],
"license": "MIT",
"repository": {
"url": "git://github.com/absolunet/node-cli.git",
Expand All @@ -17,13 +20,14 @@
"url": "https://github.com/absolunet/node-cli/issues"
},
"engines": {
"node": ">= 10.5.0"
"node": ">= 10.7.0"
},
"main": "index.js",
"scripts": {
"test": "ava test"
"test": "ava"
},
"devDependencies": {
"@absolunet/tester": "1.7.1"
"@absolunet/tester": "2.0.3"
},
"dependencies": {
"@absolunet/terminal": "^0.5.0",
Expand Down
20 changes: 10 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ console.log(cli.fullUsage);
```

```
Test project description
Test project description
Usage: testprj <command>
Usage: testprj <command>
Base
start Start project
stop Stop project
log [<sub>] Show log for sub [sub1|sub2]
Base
start Start project
stop Stop project
log [<sub>] Show log for sub [sub1|sub2]
Options
-h, --help Show help
-v, --version Show version
Options
-h, --help Show help
-v, --version Show version
testprj@1.2.3 /usr/local/bin/testprj
testprj@1.2.3 /usr/local/bin/testprj
```


Expand Down
4 changes: 1 addition & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@

const tester = require('@absolunet/tester');

tester.lintJs();
tester.lintJson();
tester.lintYaml();
tester.npmPackage.validate();

0 comments on commit 8931b13

Please sign in to comment.