From 4c4b57abc7625ad3032b089d3786ee2c136a8ef0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 12 Feb 2013 09:50:13 -0800 Subject: [PATCH] Support .json snippets --- src/packages/snippets/lib/load-snippets-handler.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/packages/snippets/lib/load-snippets-handler.coffee b/src/packages/snippets/lib/load-snippets-handler.coffee index 8cb26b687..120893015 100644 --- a/src/packages/snippets/lib/load-snippets-handler.coffee +++ b/src/packages/snippets/lib/load-snippets-handler.coffee @@ -20,7 +20,9 @@ module.exports = continue if fs.base(snippetsPath).indexOf('.') is 0 try - if fs.extension(snippetsPath) is '.cson' and object = fs.readObject(snippetsPath) + extension = fs.extension(snippetsPath) + objectExtension = extension is '.cson' or extension is '.json' + if objectExtension and object = fs.readObject(snippetsPath) snippets.push(object) else if object = fs.readPlist(snippetsPath) snippets.push(object)