vigetlabs / wordpress-site-starter

2 stars 0 forks source link

Composer Updates #45

Open bd-viget opened 2 months ago

bd-viget commented 2 months ago

Summary

There are a few things that need to be addressed to optimize the composer create-project command.

Items to Address

joshuapease commented 2 months ago

Is there a way to require directory specification when running composer create-project? (i.e. composer create-project viget/wordpress-site-starter .)

It is possible... I'm actually doing that as part of my starter script so it puts it in the root of your current directory.

CleanShot 2024-05-01 at 13 59 00@2x

Maybe add a "repositories/vcs" entry to composer.json for testing create-project locally. - Also, don't forget to delete this on PostCreateProject

Not sure if this is what you mean... but you can call composer-create from a git repo (without publishing on Packagist).

I've used that to try things out without tagging a release.

You can tack this on the end.

composer create-project viget/wordpress-site-starter --repository="{\"url\": \"https://github.com/joshuapease/craft-starter-2\", \"type\": \"vcs\"}" --stability=dev --remove-vcs
bd-viget commented 2 months ago

@joshuapease Thanks for the tips!

It is possible... I'm actually doing that as part of my starter script so it puts it in the root of your current directory.

This is what I was planning on adding in the Github repo, I was just wondering if there was some way to force it so you couldn't call composer create-project viget/wordpress-site-starter without specifying a directory (like it hits some kind of validation error). I guess it's no big deal if they create a project and it goes into a folder called wordpress-site-starter, but because we're running all the scripts to set up ddev and such, it might be a bit of a hassle to move the project or rename the folder once it's created.