From a1583decd97438a241f99287159da2948eb3a95f Mon Sep 17 00:00:00 2001 From: Eddie Monge Date: Wed, 29 Jan 2014 14:32:12 -0800 Subject: [PATCH] fix(config): allow CoffeeScript 1.7 to be used CoffeeScript 1.7 requires a register call to be made. This change is still backwards compatible with older versions of CS because the needed part, the require, is still done. The register function fails but it is wrapped in a try catch block so it fails silently. --- lib/config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index 22d77fa04..d4c09882e 100644 --- a/lib/config.js +++ b/lib/config.js @@ -7,7 +7,9 @@ var constant = require('./constants'); // Coffee is required here to enable config files written in coffee-script. // It's not directly used in this file. -require('coffee-script'); +try { + require('coffee-script').register(); +} catch (e) {} // LiveScript is required here to enable config files written in LiveScript. // It's not directly used in this file.