Conversation
Allows generating the path to be separated from creating the directory. There are a number of use cases where a path will likely not need to be created eagerly (i.e. broccoli-funnel in most cases has to remove its output path only to symlink it from an input path).
| if (className == null) className = obj.constructor && obj.constructor.name | ||
|
|
||
| var tmpDirName = prettyTmpDirName(className, prop) | ||
| return obj[prop] = path.join(findBaseDir(), tmpDirName) |
There was a problem hiding this comment.
The obj[prop] = assignment wasn't in the function this was extracted from, so we're technically assigning twice when you call makeOrRemake now. I'm not sure if this actually breaks anything.
Other than that I'm fine with this PR. 👍
Out of curiosity, are we still using this for anything post Broccoli 1.0?
There was a problem hiding this comment.
ya, I think some other packages use it for the shear convenience value (i.e. ember-cli uses it in its test suite)
|
I don't really want to maintain this package anymore. I don't think ending up with tmp directories in CWD or other random places is a terribly great pattern, so it would probably be better to write something more sensible, either from scratch or based on this package. In any case, I don't want to be the one maintaining it. :-) |
Allows generating the path to be separated from creating the directory.
There are a number of use cases where a path will likely not need to be created eagerly (i.e. broccoli-funnel in most cases has to remove its output path only to symlink it
from an input path).