taskninja 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/{index.js → src/index.js} +13 -13
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taskninja",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "a simple CLI application with JS as a (To-Do Application)",
|
|
5
|
-
"main": "./index.js",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"dev": "node src/index.js"
|
|
11
11
|
},
|
|
12
12
|
"bin": {
|
|
13
|
-
"dotask": "./index.js",
|
|
14
|
-
"taskninja": "./index.js",
|
|
15
|
-
"tn": "./index.js"
|
|
13
|
+
"dotask": "./src/index.js",
|
|
14
|
+
"taskninja": "./src/index.js",
|
|
15
|
+
"tn": "./src/index.js"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - fs: For file system operations
|
|
12
12
|
* Author: Mohamed Bakr
|
|
13
13
|
* Date: January 2026
|
|
14
|
-
* Version: 1.
|
|
14
|
+
* Version: 1.2.0
|
|
15
15
|
* @license MIT
|
|
16
16
|
* Copyright (c) 2026 Mohamed Bakr
|
|
17
17
|
* @MoBMoCaffeine
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
// for using commands in terminal
|
|
21
21
|
import { Command } from "commander";
|
|
22
22
|
|
|
23
|
-
import { addAction } from "./
|
|
24
|
-
import { listAction } from "./
|
|
25
|
-
import { updateAction } from "./
|
|
26
|
-
import { doneAction } from "./
|
|
27
|
-
import { deleteAction } from "./
|
|
28
|
-
import { undoAction } from "./
|
|
29
|
-
import { searchAction } from "./
|
|
30
|
-
import { sortAction } from "./
|
|
23
|
+
import { addAction } from "./commands/addCommand.js";
|
|
24
|
+
import { listAction } from "./commands/listCommand.js";
|
|
25
|
+
import { updateAction } from "./commands/updateCommand.js";
|
|
26
|
+
import { doneAction } from "./commands/doneCommand.js";
|
|
27
|
+
import { deleteAction } from "./commands/deleteCommand.js";
|
|
28
|
+
import { undoAction } from "./commands/undoCommand.js";
|
|
29
|
+
import { searchAction } from "./commands/searchCommand.js";
|
|
30
|
+
import { sortAction } from "./commands/sortCommand.js";
|
|
31
31
|
// assigning Commander to a variable
|
|
32
32
|
const program = new Command();
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ const program = new Command();
|
|
|
35
35
|
program
|
|
36
36
|
.name("taskninja")
|
|
37
37
|
.description("A simple CLI application to manage your tasks")
|
|
38
|
-
.version("1.
|
|
38
|
+
.version("1.2.0");
|
|
39
39
|
|
|
40
40
|
// use command 'add' with title + status + priority + dueDate + description and action
|
|
41
41
|
program
|
|
@@ -76,14 +76,14 @@ program
|
|
|
76
76
|
program
|
|
77
77
|
.command('update')
|
|
78
78
|
.alias('up')
|
|
79
|
-
.description('Update a task by
|
|
79
|
+
.description('Update a task by >> ID')
|
|
80
80
|
.action( updateAction );
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
// use command 'done' with task ID instead of 'update' + confirm to mark task as done
|
|
84
84
|
program
|
|
85
85
|
.command('done')
|
|
86
|
-
.description('Mark a task as done by
|
|
86
|
+
.description('Mark a task as done by >> ID')
|
|
87
87
|
.action( doneAction );
|
|
88
88
|
|
|
89
89
|
|
|
@@ -92,7 +92,7 @@ program
|
|
|
92
92
|
program
|
|
93
93
|
.command('delete')
|
|
94
94
|
.alias('del')
|
|
95
|
-
.description('delete a task by
|
|
95
|
+
.description('delete a task by >> ID')
|
|
96
96
|
.action( deleteAction );
|
|
97
97
|
|
|
98
98
|
// use command 'undo' to restore last deleted task
|