mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +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
|
* if any I/O error occur
|
||||||
*/
|
*/
|
||||||
public Writer getJavaScriptOutput() throws IOException {
|
public Writer getJavaScriptOutput() throws IOException {
|
||||||
if( javaScript == null && file != null && file.isFile() ) {
|
if( javaScript == null && file != null ) {
|
||||||
javaScript = new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream( getBaseWasmFile() + ".wasm.js" ) ), StandardCharsets.UTF_8 );
|
File jsFile = new File( getBaseWasmFile() + ".wasm.js" );
|
||||||
|
jsFile.getParentFile().mkdirs();
|
||||||
|
javaScript = new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream( jsFile ) ), StandardCharsets.UTF_8 );
|
||||||
}
|
}
|
||||||
return javaScript;
|
return javaScript;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user