mirror of
https://github.com/atom/atom.git
synced 2026-02-18 10:31:54 -05:00
Support requiring stylesheets without an extension
Stylesheets will attempt to be resolved with both css and less extensions if no extension is included in the path specified to requireStylesheet().
This commit is contained in:
@@ -218,6 +218,12 @@ module.exports =
|
||||
pathToResolve = args.pop()
|
||||
loadPaths = args
|
||||
|
||||
if pathToResolve[0] is '/'
|
||||
if extensions and resolvedPath = @resolveExtension(pathToResolve, extensions)
|
||||
return resolvedPath
|
||||
else
|
||||
return pathToResolve if @exists(pathToResolve)
|
||||
|
||||
for loadPath in loadPaths
|
||||
candidatePath = @join(loadPath, pathToResolve)
|
||||
if extensions
|
||||
|
||||
Reference in New Issue
Block a user