1
0
Fork 0
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:
Marc Häfner 2013-12-01 11:30:24 +01:00
parent 26200f4640
commit 54633aee3f
2 changed files with 8 additions and 8 deletions

View file

@ -259,7 +259,7 @@
return compile();
} catch (_error) {
e = _error;
removeSource(source, base, true);
removeSource(source, base);
return compileJoin();
}
} else {
@ -345,7 +345,7 @@
if (!(source === path.dirname(file))) {
continue;
}
removeSource(file, base, true);
removeSource(file, base);
sourcesChanged = true;
}
if (sourcesChanged) {
@ -353,12 +353,12 @@
}
};
removeSource = function(source, base, removeJs) {
removeSource = function(source, base) {
var err, index, jsPath;
index = sources.indexOf(source);
sources.splice(index, 1);
sourceCode.splice(index, 1);
if (removeJs && !opts.join) {
if (!opts.join) {
jsPath = outputPath(source, base);
try {
fs.unlinkSync(jsPath);

View file

@ -197,7 +197,7 @@ watch = (source, base) ->
rewatch()
compile()
catch e
removeSource source, base, yes
removeSource source, base
compileJoin()
else throw e
@ -247,17 +247,17 @@ removeSourceDir = (source, base) ->
delete watchedDirs[source]
sourcesChanged = no
for file in sources when source is path.dirname file
removeSource file, base, yes
removeSource file, base
sourcesChanged = yes
compileJoin() if sourcesChanged
# Remove a file from our source list, and source code cache. Optionally remove
# the compiled JS version as well.
removeSource = (source, base, removeJs) ->
removeSource = (source, base) ->
index = sources.indexOf source
sources.splice index, 1
sourceCode.splice index, 1
if removeJs and not opts.join
unless opts.join
jsPath = outputPath source, base
try
fs.unlinkSync jsPath