erlang自动编译与加载
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

60 regels
2.8 KiB

[
{eSync, [
%% 编译命令 支持项目自带的编译命令 也可以用该项目自带的编译逻辑
%% "rebar3 compile" | "start compile.bat" | "make"
{compileCmd, undefined},
%% 编译和加载以及其他一些日志的提示级别设置
%% 有效值: all | none | [success | warnings | errors]
%% 默认值: all
{log, all},
%% base dir
%% 默认值: "./"
{baseDir, "./"},
%% monitor file ext 监听文件的后缀名列表
%% 默认值: [".hrl", ".erl", ".beam", ".dtl", ".lfe", ".ex", ".config"]
{monitorExt, [".hrl", ".erl", ".beam", ".dtl", ".lfe", ".ex", ".config"]},
%% 这个参数用于设置特殊目录下的文件检查编译与加载
%% 格式:{extraDirs, [{strategy(), [srcDirDescr()]}] | undefined}
%% -type strategy() :: only | del | addExtra | addOnly.
%% 如果 strategy() when addExtra, 会无条件监听添加的指定目录及其子目录同步编译与加载.
%% 如果 strategy() when addOnly, 会无条件监听添加的指定目录(不含子目录)同步编译与加载.
%% 如果 strategy() when only, 仅仅监听指定目录及其子目录下的文件编译与加载.
%% 如果 strategy() when del, 则不会监听该目录及其子目录下的文件.
%% -type srcDirDescr() :: { Dir :: file:filename(), [Options :: compile_option()]}.
%% 默认值:undefined 根据当前工作目录 和 已经加载的模块做来得出需要扫描的目录
%%示例: {extraDirs, [{addExtra, [{"./_build/default/lib/erlGbh", []}]}, {only, [{"./", []}]}, {del, [{"./_build", []}]}]}.
%%{extraDirs, [{add, [{"./_build/default/lib/erlGbh", []}, {"./_build/default/lib/eSync/ebin", []}]}, {only, [{"./", []}]}, {del, [{"./_build", []}]}]}
{extraDirs, [{strategy(), [srcDirDescr()]}]},
%% 这个参数用来设置 怎么处理 当beam文件的源文件目录不是当前工作的子目录时的情况
%% 有效值: fix | allow | ignore
%% * fix = 尝试在当前目录下查找源文件
%% * allow = 不要做任何特别的事情,使用beam源文件原始路径查找该文件
%% * ignore = 而忽略对其源路径的任何更改
%% 默认值: fix
{descendant, fix},
%% Beam更新回调函数 格式: undefined | {Mondule, Fun} | [{Mondule, Fun}, ...], Fun函数只有一个参数
{onMSyncFun, undefined},
%% config更新回调函数 格式: undefined | {Mondule, Fun} | [{Mondule, Fun}, ...], Fun函数只有一个参数
{onCSyncFun, undefined},
%% 是否开启集群同步加载
{swSyncNode, false},
%% 仅仅内存编译还是编译写入到磁盘去
{isJustMem, false},
%% 如果存在debug_info_key 需要用户提供获取debug_info_key的函数 格式: undefined | {Mondule, Fun}
%% this fun need return: {debug_info_key, xxx}
{debugInfoKeyFun, undefined}
]}
].