mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
Create js file also if target file does not exists currently.
This commit is contained in:
parent
2da919c9fd
commit
be882ed8ad
@ -138,8 +138,10 @@ public class WasmTarget implements Closeable {
|
||||
* if any I/O error occur
|
||||
*/
|
||||
public Writer getJavaScriptOutput() throws IOException {
|
||||
if( javaScript == null && file != null && file.isFile() ) {
|
||||
javaScript = new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream( getBaseWasmFile() + ".wasm.js" ) ), StandardCharsets.UTF_8 );
|
||||
if( javaScript == null && file != null ) {
|
||||
File jsFile = new File( getBaseWasmFile() + ".wasm.js" );
|
||||
jsFile.getParentFile().mkdirs();
|
||||
javaScript = new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream( jsFile ) ), StandardCharsets.UTF_8 );
|
||||
}
|
||||
return javaScript;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user