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

feat: allow setting root #33

Closed
wants to merge 2 commits into from
Closed

feat: allow setting root #33

wants to merge 2 commits into from

Conversation

aminya
Copy link

@aminya aminya commented Mar 22, 2021

Made on top of #32

@sindresorhus
Copy link
Owner

Why? What's the use-case?

@aminya
Copy link
Author

aminya commented Mar 22, 2021

This allows to store all the temp files in a given directory. Another implementation can be introducing a new option like rootDirectory which is path.joined to tempDir.

https://github.com/atom-community/atom-script/blob/eb8bea2794e4280baf63b053c7688225e0e15fff/lib/grammar-utils.js#L11

@sindresorhus
Copy link
Owner

Why do you need a rootDirectory option? Or rather, why do you need to store everything under one named directory? I'm trying to understand what problems it would solve.

@aminya
Copy link
Author

aminya commented Mar 24, 2021

Because I want to keep everything related to my software under a folder nice and clean so I can later check for its existence, or I can remove easily using rimraf.

I ended up using node-temp which allows setting dir in its options.
https://github.com/bruce/node-temp#affixes

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

Successfully merging this pull request may close these issues.

2 participants