From b9d89cbf5d392747bcb9de965d04b4463e5cda97 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 9 Oct 2014 13:58:12 -0700 Subject: [PATCH] Inline valid extensions to check for --- src/module-cache.coffee | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/module-cache.coffee b/src/module-cache.coffee index 173451222..f454ad2e0 100644 --- a/src/module-cache.coffee +++ b/src/module-cache.coffee @@ -3,11 +3,6 @@ path = require 'path' fs = require 'fs-plus' semver = require 'semver' -# Make sure CoffeeScript is required when this file is required directly -# by apm -unless require.extensions['.coffee'] - require('coffee-script').register() - nativeModules = process.binding('natives') cache = @@ -58,7 +53,7 @@ loadFolderCompatibility = (modulePath, rootPath, rootMetadata, moduleCache) -> onDirectory = (childPath) -> path.basename(childPath) isnt 'node_modules' - extensions = Object.keys(require.extensions) + extensions = ['.js', '.coffee', '.json', '.node'] paths = {} onFile = (childPath) -> if path.extname(childPath) in extensions