diff --git a/.gitignore b/.gitignore index a0d235f..d79bc14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ oauth node_modules config.js +quotes.txt +submitted-quotes.txt diff --git a/commands/quote.js b/commands/quote.js index 3aed010..5cdc953 100644 --- a/commands/quote.js +++ b/commands/quote.js @@ -1,4 +1,14 @@ var fs = require('fs'); +fs.exists('quotes.txt', function (exists) { + if (!exists) { + fs.writeFile('quotes.txt', 'No quotes yet!\n'); + } +}); +fs.exists('submitted-quotes.txt', function (exists) { + if (!exists) { + fs.writeFile('submitted-quotes.txt', ''); + } +}); module.exports = function(argv, options) { options = options || {}; diff --git a/quotes.txt b/quotes.txt deleted file mode 100644 index 6cd2f7c..0000000 --- a/quotes.txt +++ /dev/null @@ -1 +0,0 @@ -Sorry, no quotes yet! diff --git a/submitted-quotes.txt b/submitted-quotes.txt deleted file mode 100644 index 2f9eb09..0000000 --- a/submitted-quotes.txt +++ /dev/null @@ -1,2 +0,0 @@ -No quotes yet! -"Test quote"