@stevescruz/task-master
Version:
A command-line todo list that allows you to write your tasks, set priorities, view existing tasks and view the next tasks due.
22 lines (17 loc) • 867 B
JavaScript
const { Command } = require('commander');
const BackupDataController = require('../controllers/BackupDataController');
async function makeExportCommand() {
const backupDataController = new BackupDataController();
const exportCommand = new Command('export')
.arguments('[target_directory]')
.usage('[target_directory]')
.addHelpText('after', '\nExample call: task-master export .')
.description("Exports the tasks.json file, containing the saved tasks, to the current working directory.\nOr, when provided, to the target directory.", {
target_directory: "The directory where you want to export tasks.json.",
})
.action(async (targetDirectory) => {
backupDataController.create('tasks.json', targetDirectory);
});
return exportCommand;
}
module.exports = makeExportCommand;