diff --git a/src/it/resources/expected/all_datatypes/generated-files.txt b/src/it/resources/expected/all_datatypes/generated-files.txt index da10cb3..b64ec32 100644 --- a/src/it/resources/expected/all_datatypes/generated-files.txt +++ b/src/it/resources/expected/all_datatypes/generated-files.txt @@ -42,7 +42,5 @@ src/it/resources/result/all_datatypes/wasm/enum_data.hpp src/it/resources/result/all_datatypes/wasm/enum_data.cpp src/it/resources/result/all_datatypes/wasm/all_datatypes.hpp src/it/resources/result/all_datatypes/wasm/all_datatypes.cpp -src/it/resources/result/all_datatypes/ts/DjinniModule.ts -src/it/resources/result/all_datatypes/ts/DjinniModule.js src/it/resources/result/all_datatypes/ts/module.ts diff --git a/src/it/resources/expected/deprecation/generated-files.txt b/src/it/resources/expected/deprecation/generated-files.txt index 8828e55..e7d2d1d 100644 --- a/src/it/resources/expected/deprecation/generated-files.txt +++ b/src/it/resources/expected/deprecation/generated-files.txt @@ -3,7 +3,5 @@ src/it/resources/result/deprecation/cpp-headers/my_flags.hpp src/it/resources/result/deprecation/cpp-headers/my_record.hpp src/it/resources/result/deprecation/cpp-headers/my_interface.hpp src/it/resources/result/deprecation/cpp/my_interface.cpp -src/it/resources/result/deprecation/ts/DjinniModule.ts -src/it/resources/result/deprecation/ts/DjinniModule.js src/it/resources/result/deprecation/ts/module.ts diff --git a/src/it/resources/expected/my_client_interface/generated-files.txt b/src/it/resources/expected/my_client_interface/generated-files.txt index 644b32e..4386515 100644 --- a/src/it/resources/expected/my_client_interface/generated-files.txt +++ b/src/it/resources/expected/my_client_interface/generated-files.txt @@ -16,6 +16,4 @@ src/it/resources/result/my_client_interface/cwrapper/cw__my_client_interface.cpp src/it/resources/result/my_client_interface/cffi/pycffi_lib_build.py src/it/resources/result/my_client_interface/wasm/my_client_interface.hpp src/it/resources/result/my_client_interface/wasm/my_client_interface.cpp -src/it/resources/result/my_client_interface/ts/DjinniModule.ts -src/it/resources/result/my_client_interface/ts/DjinniModule.js src/it/resources/result/my_client_interface/ts/module.ts diff --git a/src/it/resources/expected/my_cpp_interface/generated-files.txt b/src/it/resources/expected/my_cpp_interface/generated-files.txt index d1ecb35..6da61d5 100644 --- a/src/it/resources/expected/my_cpp_interface/generated-files.txt +++ b/src/it/resources/expected/my_cpp_interface/generated-files.txt @@ -18,7 +18,5 @@ src/it/resources/result/my_cpp_interface/cwrapper/cw__my_cpp_interface.cpp src/it/resources/result/my_cpp_interface/cffi/pycffi_lib_build.py src/it/resources/result/my_cpp_interface/wasm/my_cpp_interface.hpp src/it/resources/result/my_cpp_interface/wasm/my_cpp_interface.cpp -src/it/resources/result/my_cpp_interface/ts/DjinniModule.ts -src/it/resources/result/my_cpp_interface/ts/DjinniModule.js src/it/resources/result/my_cpp_interface/ts/module.ts diff --git a/src/it/resources/expected/my_enum/generated-files.txt b/src/it/resources/expected/my_enum/generated-files.txt index 09ede75..bd26c11 100644 --- a/src/it/resources/expected/my_enum/generated-files.txt +++ b/src/it/resources/expected/my_enum/generated-files.txt @@ -13,7 +13,5 @@ src/it/resources/result/my_enum/cwrapper/dh__my_enum.hpp src/it/resources/result/my_enum/cwrapper/dh__my_enum.cpp src/it/resources/result/my_enum/wasm/my_enum.hpp src/it/resources/result/my_enum/wasm/my_enum.cpp -src/it/resources/result/my_enum/ts/DjinniModule.ts -src/it/resources/result/my_enum/ts/DjinniModule.js src/it/resources/result/my_enum/ts/module.ts diff --git a/src/it/resources/expected/my_flags/generated-files.txt b/src/it/resources/expected/my_flags/generated-files.txt index 6c8bb70..a5ab86f 100644 --- a/src/it/resources/expected/my_flags/generated-files.txt +++ b/src/it/resources/expected/my_flags/generated-files.txt @@ -13,7 +13,5 @@ src/it/resources/result/my_flags/cwrapper/dh__my_flags.hpp src/it/resources/result/my_flags/cwrapper/dh__my_flags.cpp src/it/resources/result/my_flags/wasm/my_flags.hpp src/it/resources/result/my_flags/wasm/my_flags.cpp -src/it/resources/result/my_flags/ts/DjinniModule.ts -src/it/resources/result/my_flags/ts/DjinniModule.js src/it/resources/result/my_flags/ts/module.ts diff --git a/src/it/resources/expected/my_record/generated-files.txt b/src/it/resources/expected/my_record/generated-files.txt index 7d6611c..2224029 100644 --- a/src/it/resources/expected/my_record/generated-files.txt +++ b/src/it/resources/expected/my_record/generated-files.txt @@ -26,7 +26,5 @@ src/it/resources/result/my_record/cwrapper/dh__my_record.hpp src/it/resources/result/my_record/cwrapper/dh__my_record.cpp src/it/resources/result/my_record/wasm/my_record.hpp src/it/resources/result/my_record/wasm/my_record.cpp -src/it/resources/result/my_record/ts/DjinniModule.ts -src/it/resources/result/my_record/ts/DjinniModule.js src/it/resources/result/my_record/ts/module.ts diff --git a/src/it/resources/expected/using_custom_datatypes/generated-files.txt b/src/it/resources/expected/using_custom_datatypes/generated-files.txt index 37399f0..11b501f 100644 --- a/src/it/resources/expected/using_custom_datatypes/generated-files.txt +++ b/src/it/resources/expected/using_custom_datatypes/generated-files.txt @@ -34,6 +34,4 @@ src/it/resources/result/using_custom_datatypes/wasm/custom_datatype.hpp src/it/resources/result/using_custom_datatypes/wasm/custom_datatype.cpp src/it/resources/result/using_custom_datatypes/wasm/other_record.hpp src/it/resources/result/using_custom_datatypes/wasm/other_record.cpp -src/it/resources/result/using_custom_datatypes/ts/DjinniModule.ts -src/it/resources/result/using_custom_datatypes/ts/DjinniModule.js src/it/resources/result/using_custom_datatypes/ts/module.ts diff --git a/src/main/scala/djinni/TsGenerator.scala b/src/main/scala/djinni/TsGenerator.scala index 969db93..129be31 100644 --- a/src/main/scala/djinni/TsGenerator.scala +++ b/src/main/scala/djinni/TsGenerator.scala @@ -254,7 +254,6 @@ class TsGenerator(spec: Spec) extends Generator(spec) { } // -------------------------------------------------------------------------- override def generate(idl: Seq[TypeDecl]) { - writeDjinniModuleFilesFile() createFile( spec.tsOutFolder.get, spec.tsModule + ".ts", @@ -349,40 +348,4 @@ class TsGenerator(spec: Spec) extends Generator(spec) { typeParams: Seq[TypeParam], i: Interface ) {} - - def writeDjinniModuleFile(f: IndentWriter => Unit, ext: String): Unit = { - createFileOnce( - spec.tsOutFolder.get, - s"DjinniModule.$ext", - (w: IndentWriter) => { - w.wl("// AUTOGENERATED FILE - DO NOT MODIFY!") - w.wl("// This file was generated by Djinni") - w.wl - f(w) - } - ) - } - - def writeDjinniModuleFilesFile(): Unit = { - val tsContent = Source - .fromResource("ts/DjinniModule.ts") - .getLines - .mkString("\n") - writeDjinniModuleFile( - w => { - w.wl(tsContent) - }, - "ts" - ) - val jsContent = Source - .fromResource("ts/DjinniModule.js") - .getLines - .mkString("\n") - writeDjinniModuleFile( - w => { - w.wl(jsContent) - }, - "js" - ) - } }