diff --git a/lib/util.js b/lib/util.js index 32de6ef..c25bde8 100644 --- a/lib/util.js +++ b/lib/util.js @@ -9,7 +9,7 @@ function getFilesFromDisk(subdir) { var filesOnDisk = []; // Only iterate through supported .js, .gs and .html files in dir - dir.readFiles(subdir, { match: /.js$|.gs$|.html$/ }, + dir.readFiles(subdir, { match: /.js$|.gs$|.json$|.html$/ }, // Invoke this callback on each file function(err, content, filename, next) { if (err) return reject(err); @@ -50,12 +50,14 @@ function hasFileOnDisk(filesOnDisk, file) { function getFileType(file) { if (file.ext === '.js') return 'server_js'; if (file.ext === '.gs') return 'server_js'; + if (file.ext === '.json') return 'json'; if (file.ext === '.html') return 'html'; throw new Error('Unsupported file type found. Google Apps Script only allows .js and .html'); } function getFileExtension(file) { if (file.type === 'server_js') return '.js'; + if (file.type === 'json') return '.json'; if (file.type === 'html') return '.html'; throw new Error('Unsupported file type found'); }