@umarfarooq57/tasky 1.0.0 → 1.0.1
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/README.md +9 -0
- package/package.json +1 -1
- package/src/commands.js +4 -3
- package/testing/tasks.json +2 -2
package/README.md
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 📝 Tasky CLI
|
|
2
|
+
|
|
3
|
+
A sleek, fast, and colorful command-line interface (CLI) task manager built with Node.js. Effortlessly manage your daily tasks directly from your terminal.
|
|
4
|
+
|
|
5
|
+
## ✨ Features
|
|
6
|
+
|
|
7
|
+
- **Blazing Fast**: Manage tasks instantly without leaving your terminal.
|
|
8
|
+
- **Colorful Output**: Beautiful, clear interface with color-coded feedback powered by `chalk`.
|
|
9
|
+
- **Local Storage**: Your data is saved locally on your machine, keeping it completely private.
|
package/package.json
CHANGED
package/src/commands.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
1
2
|
import { readTasks, saveTasks } from "./storage.js";
|
|
2
3
|
|
|
3
4
|
export const addTask = (taskDescription) => {
|
|
4
5
|
const tasks = readTasks();
|
|
5
6
|
tasks.push({ id: tasks.length + 1, task: taskDescription, done: false });
|
|
6
7
|
saveTasks(tasks);
|
|
7
|
-
console.log(`Task added successfully: "${taskDescription}"`);
|
|
8
|
+
console.log(chalk.green(`Task added successfully: "${taskDescription}"`));
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
export const listTasks = () => {
|
|
11
12
|
const tasks = readTasks();
|
|
12
13
|
if (tasks.length === 0) {
|
|
13
|
-
console.log('No tasks found. Type `tasky add "your task"` to create one!');
|
|
14
|
+
console.log(chalk.red.bold('No tasks found. Type `tasky add "your task"` to create one!'));
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
16
17
|
console.log("\nYour Task List:");
|
|
@@ -29,5 +30,5 @@ export const editTask = (id, newDesc) => {
|
|
|
29
30
|
}
|
|
30
31
|
taskToEdit.task = newDesc;
|
|
31
32
|
saveTasks(tasks)
|
|
32
|
-
console.log(`Task with id:${id}
|
|
33
|
+
console.log(`Task with id:${chalk.blue.underline(id)} was successfully edited!`)
|
|
33
34
|
};
|