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

Add buildTmpPath method. #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented Nov 23, 2016

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).

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)
Copy link
Owner

@joliss joliss Dec 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya, I think some other packages use it for the shear convenience value (i.e. ember-cli uses it in its test suite)

@joliss
Copy link
Owner

joliss commented Feb 14, 2017

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. :-)

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