Skip to content

Commit

Permalink
[ADD] File merge function
Browse files Browse the repository at this point in the history
  • Loading branch information
kang0921ok committed Aug 20, 2017
1 parent 0190954 commit caabcc5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/com/yahoo/platform/yui/compressor/YUICompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ public EvaluatorException runtimeError(String message, String sourceName,
if (outputFilename == null) {
out = new BufferedWriter(new OutputStreamWriter(System.out, charset));
} else {
out = new BufferedWriter
(new OutputStreamWriter(new FileOutputStream(outputFilename, true), charset));
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFilename, true), charset));
if (mungemap != null) {
mungemap.write("\n\nFile: "+outputFilename+"\n\n");
}
Expand All @@ -229,9 +228,8 @@ public EvaluatorException runtimeError(String message, String sourceName,

if (outputFilename == null) {
out = new BufferedWriter(new OutputStreamWriter(System.out, charset));
} else {
out = new BufferedWriter
(new OutputStreamWriter(new FileOutputStream(outputFilename), charset));
} else {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFilename), charset));
}

compressor.compress(out, linebreakpos);
Expand Down Expand Up @@ -308,4 +306,4 @@ private static void usage() {
+ "option is required. Otherwise, the 'type' option is required only if the input\n"
+ "file extension is neither 'js' nor 'css'.");
}
}
}

0 comments on commit caabcc5

Please sign in to comment.