taskninja 1.0.2 → 1.0.3
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/app.js +10 -4
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -214,14 +214,17 @@ program
|
|
|
214
214
|
await saveTasks(tasks);
|
|
215
215
|
console.log('Task updated successfully!');
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
const tableData = tasks.map(task => ({
|
|
218
218
|
ID: task.id,
|
|
219
219
|
Title: task.title,
|
|
220
220
|
Status: task.status,
|
|
221
221
|
Priority: task.priority,
|
|
222
222
|
DueDate: task.dueDate,
|
|
223
223
|
Description: task.description || ''
|
|
224
|
-
}
|
|
224
|
+
}));
|
|
225
|
+
|
|
226
|
+
// display all tasks in table format
|
|
227
|
+
console.table(tableData);
|
|
225
228
|
});
|
|
226
229
|
|
|
227
230
|
// use command 'delete' with task ID and action
|
|
@@ -262,14 +265,17 @@ program
|
|
|
262
265
|
await saveTasks(newTasks);
|
|
263
266
|
console.log('Task deleted successfully!');
|
|
264
267
|
|
|
265
|
-
|
|
268
|
+
const tableData = tasks.map(task => ({
|
|
266
269
|
ID: task.id,
|
|
267
270
|
Title: task.title,
|
|
268
271
|
Status: task.status,
|
|
269
272
|
Priority: task.priority,
|
|
270
273
|
DueDate: task.dueDate,
|
|
271
274
|
Description: task.description || ''
|
|
272
|
-
}
|
|
275
|
+
}));
|
|
276
|
+
|
|
277
|
+
// display all tasks in table format
|
|
278
|
+
console.table(tableData);
|
|
273
279
|
});
|
|
274
280
|
|
|
275
281
|
// parse command line arguments
|