silverstripe / sspak

Tool for managing bundles of db/assets from Silverstripe environments
http://silverstripe.github.io/sspak/
BSD 3-Clause "New" or "Revised" License
47 stars 34 forks source link

ENHANCEMENT Support global composer installation #51

Closed robbieaverill closed 7 years ago

robbieaverill commented 7 years ago

Resolves #21

helpfulrobot commented 7 years ago

@robbieaverill, thanks for your PR! By analyzing the blame information on this pull request, I identified @sminnee, @wilr and @halkyon to be potential reviewers

wilr commented 7 years ago

👍

dhensby commented 7 years ago

This commit does a lot more than it says on the tin. Would you mind either splitting it into 3 commits or even 3 PRs?

  1. Readme format update
  2. Code style update
  3. Adding composer global support (including new docs)
robbieaverill commented 7 years ago

Hey @dhensby - I've pushed an update separating the changes into three commits.

Is there a reason we can't have a unified bin file/location?

Yes - composer requires a single bin file declares for it to create symlinks. If I tell it to use bin/sspak then I don't have the ability to define the package root manually. There's possibly a way around it with some trickery in being able to detect that the package has been installed with composer, but this way allows you to still call sspak, but have the logic for it in a separate file.

You've just defined PACKAGE_ROOT - you should use it

Good point - updated.


Tested with 3.x code - working correctly. The 4.x compatibility in #49 isn't quite there yet I don't think, may need a bit more tweaking: Path error: FRAMEWORK_PATH ... not within BASE_PATH ...

dhensby commented 7 years ago

OK - thanks.