fs.appendFile(Biju.file, buffer, function (err) { if (err) { log.error('Error writing file.'); } log.success(note + ' was added to the list'); });
Biju.init = function () { var args = process.argv.slice(2) , method = args[0]; if (!Biju.file) { return log.error('You need to set BIJU_FILE environment variable. e.g (export BIJU_FILE="~/.biju.txt"'); } callMethod(method); };
fs.writeFile(Biju.file, '', 'utf-8', function (err) { if (err) { log.error('Can\'t clean the tasks!'); } });
fs.writeFile(file, output, 'utf-8', function (err) { if (err) { log.error('Can\'t remove the task'); } });