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:
Kevin Sawicki
2013-03-25 23:34:51 -04:00
parent 844f5343c2
commit fab5842651
3 changed files with 32 additions and 11 deletions

View File

@@ -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