diff --git a/config/maps b/config/maps new file mode 100644 index 0000000..8aa3993 --- /dev/null +++ b/config/maps @@ -0,0 +1 @@ +maps:keys(#{0 => false, 1 => true}) == [0,1]. \ No newline at end of file diff --git a/rebar.config.script b/rebar.config.script index 8e9493f..ce4ca9f 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,6 +1,8 @@ -application:start(compiler), -case {erlang:system_info(version), application:get_key(compiler, vsn), os:getenv("JSX_NO_MAPS")} of - {X, {ok, Y}, false} when X >= "6.0" andalso Y >= "5.0" -> - CONFIG ++ [{erl_opts, [{d, release_supports_maps}]}]; - _ -> CONFIG +case os:getenv("JSX_NOMAPS") of + false -> + try file:script("config/maps") of {ok, true} -> + [{d, release_supports_maps}] ++ CONFIG + catch _:_ -> CONFIG + end; + _ -> CONFIG end. \ No newline at end of file