mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Inline valid extensions to check for
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user