Open bd-viget opened 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.
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
@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.
Summary
There are a few things that need to be addressed to optimize the
composer create-project
command.Items to Address
composer create-project
? (i.e.composer create-project viget/wordpress-site-starter .
)wp core download
". (confirmddev
is running this command, use Container relative path)ddev
is installed.composer/composer
dependency fromrequire-dev
symfony/console
dependency fromrequire-dev
bin/composer-scripts/ProjectEvents/PostCreateProjectScript.php
file.bin/composer-scripts/ProjectEvents/PreInstallScript.php
file."post-create-project-cmd"
object from"scripts"
incomposer.json
"pre-install-cmd"
object from"scripts"
incomposer.json
composer create-project
wordpress-site-starter
README duringPostCreateProject
.composer.json
for testingcreate-project
locally. - Also, don't forget to delete this onPostCreateProject