Skip to content

No __dirname/__filename equivalent for source file #35

@TamsynUlthara

Description

@TamsynUlthara

__dirname and __filename refer to the compiled JavaScript file's location, rather than the original Earl Grey source. A pair of macros that expanded to the original source location would be useful.

Here's an example implementation:

inline-macro source-dirname(#void{}): `path.dirname(module.filename)`
inline-macro source-filename(#void{}): `module.filename`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions