mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Remove unnecessary parameter
This commit is contained in:
parent
26200f4640
commit
54633aee3f
2 changed files with 8 additions and 8 deletions
|
@ -259,7 +259,7 @@
|
||||||
return compile();
|
return compile();
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
e = _error;
|
e = _error;
|
||||||
removeSource(source, base, true);
|
removeSource(source, base);
|
||||||
return compileJoin();
|
return compileJoin();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -345,7 +345,7 @@
|
||||||
if (!(source === path.dirname(file))) {
|
if (!(source === path.dirname(file))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
removeSource(file, base, true);
|
removeSource(file, base);
|
||||||
sourcesChanged = true;
|
sourcesChanged = true;
|
||||||
}
|
}
|
||||||
if (sourcesChanged) {
|
if (sourcesChanged) {
|
||||||
|
@ -353,12 +353,12 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
removeSource = function(source, base, removeJs) {
|
removeSource = function(source, base) {
|
||||||
var err, index, jsPath;
|
var err, index, jsPath;
|
||||||
index = sources.indexOf(source);
|
index = sources.indexOf(source);
|
||||||
sources.splice(index, 1);
|
sources.splice(index, 1);
|
||||||
sourceCode.splice(index, 1);
|
sourceCode.splice(index, 1);
|
||||||
if (removeJs && !opts.join) {
|
if (!opts.join) {
|
||||||
jsPath = outputPath(source, base);
|
jsPath = outputPath(source, base);
|
||||||
try {
|
try {
|
||||||
fs.unlinkSync(jsPath);
|
fs.unlinkSync(jsPath);
|
||||||
|
|
|
@ -197,7 +197,7 @@ watch = (source, base) ->
|
||||||
rewatch()
|
rewatch()
|
||||||
compile()
|
compile()
|
||||||
catch e
|
catch e
|
||||||
removeSource source, base, yes
|
removeSource source, base
|
||||||
compileJoin()
|
compileJoin()
|
||||||
else throw e
|
else throw e
|
||||||
|
|
||||||
|
@ -247,17 +247,17 @@ removeSourceDir = (source, base) ->
|
||||||
delete watchedDirs[source]
|
delete watchedDirs[source]
|
||||||
sourcesChanged = no
|
sourcesChanged = no
|
||||||
for file in sources when source is path.dirname file
|
for file in sources when source is path.dirname file
|
||||||
removeSource file, base, yes
|
removeSource file, base
|
||||||
sourcesChanged = yes
|
sourcesChanged = yes
|
||||||
compileJoin() if sourcesChanged
|
compileJoin() if sourcesChanged
|
||||||
|
|
||||||
# Remove a file from our source list, and source code cache. Optionally remove
|
# Remove a file from our source list, and source code cache. Optionally remove
|
||||||
# the compiled JS version as well.
|
# the compiled JS version as well.
|
||||||
removeSource = (source, base, removeJs) ->
|
removeSource = (source, base) ->
|
||||||
index = sources.indexOf source
|
index = sources.indexOf source
|
||||||
sources.splice index, 1
|
sources.splice index, 1
|
||||||
sourceCode.splice index, 1
|
sourceCode.splice index, 1
|
||||||
if removeJs and not opts.join
|
unless opts.join
|
||||||
jsPath = outputPath source, base
|
jsPath = outputPath source, base
|
||||||
try
|
try
|
||||||
fs.unlinkSync jsPath
|
fs.unlinkSync jsPath
|
||||||
|
|
Loading…
Reference in a new issue