Skip to content

Add buildTmpPath method.#15

Open
rwjblue wants to merge 1 commit intobroccolijs:masterfrom
rwjblue:add-build-tmp-path
Open

Add buildTmpPath method.#15
rwjblue wants to merge 1 commit intobroccolijs:masterfrom
rwjblue:add-build-tmp-path

Conversation

@rwjblue
Copy link
Member

@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
Member

@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
Member 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
Member

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