|
@@ -228,6 +228,7 @@ module Define = struct
|
|
|
| ReplaceFiles
|
|
|
| Scriptable
|
|
|
| ShallowExpose
|
|
|
+ | SourceHeader
|
|
|
| SourceMapContent
|
|
|
| Swc
|
|
|
| SwfCompressLevel
|
|
@@ -312,6 +313,7 @@ module Define = struct
|
|
|
| ReplaceFiles -> ("replace_files","GenCommon internal")
|
|
|
| Scriptable -> ("scriptable","GenCPP internal")
|
|
|
| ShallowExpose -> ("shallow-expose","Expose types to surrounding scope of Haxe generated closure without writing to window object")
|
|
|
+ | SourceHeader -> ("source-header","Print value as comment on top of generated files, use '' value to disable")
|
|
|
| SourceMapContent -> ("source-map-content","Include the hx sources as part of the JS source map")
|
|
|
| Swc -> ("swc","Output a SWC instead of a SWF")
|
|
|
| SwfCompressLevel -> ("swf_compress_level","<level:1-9> Set the amount of compression for the SWF output")
|
|
@@ -693,6 +695,11 @@ let memory_marker = [|Unix.time()|]
|
|
|
|
|
|
let create v args =
|
|
|
let m = Type.mk_mono() in
|
|
|
+ let defines =
|
|
|
+ PMap.add "true" "1" (
|
|
|
+ PMap.add "source-header" "Generated by Haxe" (
|
|
|
+ if !display_default <> DMNone then PMap.add "display" "1" PMap.empty else PMap.empty))
|
|
|
+ in
|
|
|
{
|
|
|
version = v;
|
|
|
args = args;
|
|
@@ -709,7 +716,7 @@ let create v args =
|
|
|
std_path = [];
|
|
|
class_path = [];
|
|
|
main_class = None;
|
|
|
- defines = PMap.add "true" "1" (if !display_default <> DMNone then PMap.add "display" "1" PMap.empty else PMap.empty);
|
|
|
+ defines = defines;
|
|
|
package_rules = PMap.empty;
|
|
|
file = "";
|
|
|
types = [];
|