Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010588
import-path.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
669 B
Referenced Files
None
Subscribers
None
import-path.ts
View Options
import
{
relative
,
dirname
}
from
"path"
;
import
_locreq
from
"locreq"
;
const
target_locreq
=
_locreq
(
process
.
cwd
());
export
function
importPath
(
project_module_path
:
string
,
project_target_path
:
string
)
:
string
{
let
result
=
relative
(
dirname
(
target_locreq
.
resolve
(
project_module_path
)),
target_locreq
.
resolve
(
project_target_path
).
replace
(
/.tsx?$/
,
".js"
)
);
if
(
result
[
0
]
!=
"."
)
{
result
=
"./"
+
result
;
}
return
result
;
}
export
function
curryImportPath
(
project_module_path
:
string
)
:
(
project_target_path
:
string
)
=>
string
{
return
function
(
project_target_path
:
string
)
{
return
importPath
(
project_module_path
,
project_target_path
);
};
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:44 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625037
Default Alt Text
import-path.ts (669 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment