Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No __dirname/__filename equivalent for source file #35

Open
TamsynUlthara opened this issue May 12, 2016 · 0 comments
Open

No __dirname/__filename equivalent for source file #35

TamsynUlthara opened this issue May 12, 2016 · 0 comments

Comments

@TamsynUlthara
Copy link
Contributor

__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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant