diff options
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r-- | compiler/jsgen.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index f91bfda8c..1be8629b9 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -2345,6 +2345,9 @@ proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode = else: AbsoluteFile(getCurrentDir() / m.config.outFile.string) else: changeFileExt(completeCFilePath(m.config, AbsoluteFile f), ext) + let (outDir, _, _) = splitFile(outfile) + if not outDir.isEmpty: + createDir(outDir) discard writeRopeIfNotEqual(genHeader() & code, outfile) for obj, content in items(globals.classes): genClass(m.config, obj, content, ext) |