File tree 1 file changed +6
-20
lines changed
1 file changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -43,27 +43,13 @@ let removePathPrefix ~prefix path =
43
43
let appendSuffix ~config sourcePath =
44
44
(sourcePath |> handleNamespace) ^ ModuleExtension. tsInputFileSuffix ~config
45
45
46
- let getOutputFileRelative ~config sourcePath =
47
- if Filename. is_relative sourcePath then appendSuffix ~config sourcePath
48
- else
49
- let relative_path =
50
- removePathPrefix ~prefix: config.projectRoot sourcePath
51
- in
52
- appendSuffix ~config relative_path
53
-
54
- let computeAbsoluteOutputFilePath ~(config : Config.t ) path =
55
- Filename. concat config.projectRoot (getOutputFileRelative ~config path)
46
+ let getOutputFileRelative ~(config : Config.t ) path =
47
+ let relativePath = removePathPrefix ~prefix: config.projectRoot path in
48
+ appendSuffix ~config relativePath
56
49
57
- let getOutputFile ~(config : Config.t ) sourcePath =
58
- if Filename. is_relative sourcePath then
59
- (* assuming a relative path from the project root *)
60
- computeAbsoluteOutputFilePath ~config sourcePath
61
- else
62
- (* for absolute paths we want to place the output beside the source file *)
63
- let relative_path =
64
- removePathPrefix ~prefix: config.projectRoot sourcePath
65
- in
66
- computeAbsoluteOutputFilePath ~config relative_path
50
+ let getOutputFile ~(config : Config.t ) absoluteSourcePath =
51
+ let relativeOutputPath = getOutputFileRelative ~config absoluteSourcePath in
52
+ Filename. concat config.projectRoot relativeOutputPath
67
53
68
54
let getModuleName cmt =
69
55
cmt |> handleNamespace |> Filename. basename |> ModuleName. fromStringUnsafe
You can’t perform that action at this time.
0 commit comments