Fixes #2941 -- don't destroy extensionless filenames for --join
This commit is contained in:
parent
351c875576
commit
c22707cd53
|
@ -167,7 +167,7 @@
|
|||
pathSep = useWinPathSep ? /\\|\// : /\//;
|
||||
parts = file.split(pathSep);
|
||||
file = parts[parts.length - 1];
|
||||
if (!stripExt) {
|
||||
if (!(stripExt && file.indexOf('.') >= 0)) {
|
||||
return file;
|
||||
}
|
||||
parts = file.split('.');
|
||||
|
|
|
@ -119,7 +119,7 @@ compilePath = (source, topLevel, base) ->
|
|||
# Compile a single source script, containing the given code, according to the
|
||||
# requested options. If evaluating the script directly sets `__filename`,
|
||||
# `__dirname` and `module.filename` to be correct relative to the script's path.
|
||||
compileScript = (file, input, base=null) ->
|
||||
compileScript = (file, input, base = null) ->
|
||||
o = opts
|
||||
options = compileOptions file, base
|
||||
try
|
||||
|
|
|
@ -122,7 +122,7 @@ exports.baseFileName = (file, stripExt = no, useWinPathSep = no) ->
|
|||
pathSep = if useWinPathSep then /\\|\// else /\//
|
||||
parts = file.split(pathSep)
|
||||
file = parts[parts.length - 1]
|
||||
return file unless stripExt
|
||||
return file unless stripExt and file.indexOf('.') >= 0
|
||||
parts = file.split('.')
|
||||
parts.pop()
|
||||
parts.pop() if parts[parts.length - 1] is 'coffee' and parts.length > 1
|
||||
|
|
Loading…
Reference in New Issue