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

Track dependencies #66

Closed
ForbesLindesay opened this issue Feb 12, 2015 · 5 comments · Fixed by #71
Closed

Track dependencies #66

ForbesLindesay opened this issue Feb 12, 2015 · 5 comments · Fixed by #71
Labels
enhancement New feature or request

Comments

@ForbesLindesay
Copy link

It would be really useful if ejs offered a way to get a list of the dependencies for a file when compiling it. This would enable recompiling only when some files have changed. Ideally this would work roughly the same as jade's support for this feature.

@TimothyGu TimothyGu added the enhancement New feature or request label Feb 13, 2015
@TimothyGu
Copy link
Collaborator

Adding it to .compile() is simple, but there doesn't seem to be a better way to do the same thing for .render() without changing the API or boxing the string (which gives terrible console.log output without .toString()).

@TimothyGu
Copy link
Collaborator

See WIP: https://github.com/mde/ejs/tree/deps

@ForbesLindesay
Copy link
Author

I don't need it on .render, so that would be fine with me. I think it would be fair enough to say that people who need access to the dependencies must use the compile api.

@TimothyGu
Copy link
Collaborator

@mde, any comments on this?

@mde
Copy link
Owner

mde commented Feb 22, 2015

Doesn't seem all that useful for render anyhow. I can see the utility for this though, and it doesn't add much complexity to the code. Let's do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants