From 72f2a8a1659a6a3c5545e990891c974d32ef85ff Mon Sep 17 00:00:00 2001 From: cesine Date: Mon, 20 Jul 2020 12:11:25 -0400 Subject: [PATCH] add coffeescript to coffee extension detection CoffeeScript on NPM has moved to coffeescript (no hyphen) https://www.npmjs.com/package/coffee-script --- lib/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index c6d1d0f75..2d398e056 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -17,13 +17,18 @@ var async = require('../deps/async'), /** - * Detect if coffee-script, iced-coffeescript, or streamline are available and + * Detect if coffeescript, coffee-script, iced-coffeescript, or streamline are available and * the respective file extensions to the search filter in modulePaths if it is. */ var extensions = [ 'js' ]; // js is always supported: add it unconditionally var extensionPattern; +try { + require('coffee' + 'script/register'); + extensions.push('coffee'); +} catch (e) { } + try { require('coffee' + '-script/register'); extensions.push('coffee');