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

Good idea to set target_directoryto 'vendor'? #52

Closed
evrpress opened this issue Dec 6, 2022 · 1 comment
Closed

Good idea to set target_directoryto 'vendor'? #52

evrpress opened this issue Dec 6, 2022 · 1 comment

Comments

@evrpress
Copy link

evrpress commented Dec 6, 2022

Thanks for the tool, like it so far!

I wonder if it's ok to set the output directory to 'vendor' to not have 'vendor_prefix' or simliar.

Currently I run rm -rf vendor;mv vendor_prefix vendor after the strauss command to only have one vendor folder which is also in my .gitignore.

Also I like to keep brianhenryie/strauss dependency in the 'require-dev' but that would bot work if running composer update --no-dev for the production build. What's the expected approach here?

Thanks!

@BrianHenryIE
Copy link
Owner

BrianHenryIE commented Dec 6, 2022

Hey,

I think the easiest answer is to change your default vendor directory using your composer.json's config/vendor-dir key to something else, e.g. vendor-real, and then set the Strauss target_directory to vendor.

As a more pure/correct way, there is a branch started for setting the target_directory to vendor so changes are made in-situ without copying files, but I haven't written tests against it or really used it myself. It might be working fine, give it a try: #34 (comment)

And you can download and use the .phar file to avoid the need to install Strauss via Composer. There's a suggested issue to distribute through Phive, but I've yet to use that myself so it's not yet done: #6 . The README describes downloading and using the Phar.

Unfortunately, until the in-situ branch is tested and merged, those two solutions are mutually exclusive!

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

No branches or pull requests

2 participants