mirror of
https://github.com/denoland/deno.git
synced 2024-12-29 10:39:10 -05:00
60688c563e
This commit adds `import.meta.filename` and `import.meta.dirname` APIs. These APIs return string representation of filename and containing dirname. They are only defined for local modules (modules that have `file:///` scheme). Example: ```ts console.log(import.meta.filename, import.meta.dirname) ``` Unix: ``` $ deno run /dev/my_module.ts /dev/my_module.ts /dev/ ``` Windows: ``` $ deno run C:\dev\my_module.ts C:\dev\my_module.ts C:\ ``` |
||
---|---|---|
.. | ||
importmap.json | ||
main.out | ||
main.ts | ||
other.ts |