You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create a Shell Script to Remove/Clean Composer Managed Directories then run install #31
👍 There's already a branch in-progress that does the "do you have composer available" checking. This might fit in with that nicely and give that script a better reason for existing. (Right now it's silly to have a "safe" way to run composer if it's available, but that can only be installed by already having run composer.) See the f/composer-install bullet on #29.
This would raise the degree of difficulty, but it occurs to me that any such script, if it wanted to truly be convenient/portable/safe, should be able to detect the proper directories to purge based on the available composer.json file.
For example, the Shell-Scripts repo expects consuming projects to specify
...which overrides the default vendor/bin/ directory that would normally be used. Especially when it comes to triggering rm "automatically," we need to try to ensure we don't purge anything that we shouldn't be.
We're going down a rabbit hole here, but there is a json npm package that can be installed globally and used by shell scripts to read and extract values from .json files. That would make grabbing these values from the composer.json pretty easy.
As an additional safety precaution, if the script can not detect the presence of version control (.git/ directory or svn's equivelent maybe?) that could be used as a safety net for an erroneous delete, maybe it should refuse to perform the delete without a prompt of a -y flag to force it.
Activity
beporter commentedon Dec 11, 2014
👍 There's already a branch in-progress that does the "do you have composer available" checking. This might fit in with that nicely and give that script a better reason for existing. (Right now it's silly to have a "safe" way to run composer if it's available, but that can only be installed by already having run composer.) See the
f/composer-installbullet on #29.beporter commentedon Dec 11, 2014
This would raise the degree of difficulty, but it occurs to me that any such script, if it wanted to truly be convenient/portable/safe, should be able to detect the proper directories to purge based on the available composer.json file.
For example, the Shell-Scripts repo expects consuming projects to specify
...which overrides the default
vendor/bin/directory that would normally be used. Especially when it comes to triggeringrm"automatically," we need to try to ensure we don't purge anything that we shouldn't be.beporter commentedon Dec 11, 2014
We're going down a rabbit hole here, but there is a
jsonnpm package that can be installed globally and used by shell scripts to read and extract values from.jsonfiles. That would make grabbing these values from the composer.json pretty easy.beporter commentedon Jan 15, 2015
As an additional safety precaution, if the script can not detect the presence of version control (
.git/directory or svn's equivelent maybe?) that could be used as a safety net for an erroneous delete, maybe it should refuse to perform the delete without a prompt of a-yflag to force it.beporter commentedon Jan 15, 2015
The best place to extend this work is probably from #35.
Add a new composer-reinstall script.