File tree 1 file changed +7
-16
lines changed
1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -46,26 +46,17 @@ let append_suffix ~config source_path =
46
46
^ ModuleExtension. ts_input_file_suffix ~config
47
47
48
48
let get_output_file_relative ~(config : Config.t ) source_path =
49
- if Filename. is_relative source_path then append_suffix ~config source_path
50
- else
51
- let relative_path =
52
- remove_path_prefix ~prefix: config.project_root source_path
53
- in
54
- append_suffix ~config relative_path
49
+ let relativePath =
50
+ remove_path_prefix ~prefix: config.project_root source_path
51
+ in
52
+ append_suffix ~config relativePath
55
53
56
54
let compute_absolute_output_file_path ~(config : Config.t ) path =
57
55
Filename. concat config.project_root (get_output_file_relative ~config path)
58
56
59
- let get_output_file ~(config : Config.t ) sourcePath =
60
- if Filename. is_relative sourcePath then
61
- (* assuming a relative path from the project root *)
62
- compute_absolute_output_file_path ~config sourcePath
63
- else
64
- (* for absolute paths we want to place the output beside the source file *)
65
- let relative_path =
66
- remove_path_prefix ~prefix: config.project_root sourcePath
67
- in
68
- compute_absolute_output_file_path ~config relative_path
57
+ let get_output_file ~(config : Config.t ) source_path =
58
+ let relative_output_path = get_output_file_relative ~config source_path in
59
+ Filename. concat config.project_root relative_output_path
69
60
70
61
let get_module_name cmt =
71
62
cmt |> handle_namespace |> Filename. basename |> ModuleName. from_string_unsafe
You can’t perform that action at this time.
0 commit comments