Closed simonhamp closed 5 years ago
Hi Simon,
I'm not really sure how to go about this. I mean yes, it would be great if people could just create-project
, but I'm not clear about two things:
Updating
composer update
, from my understanding, would only update dependencies - in this case, Jigsaw. So in order to get Maizzle updates, one would still need to either manually add changes to files, or create a new project that will pull in the latest tagged release.
Using Maizzle as a dependency
Adding to Packagist would make people think they could use Maizzle as a dependency in their project. However, all work is done inside the source
directory, which would be in fact added under vendor
. This can't work, because (a) you gitignore that folder and (b) any composer update
will wipe out your work, obviously.
I'd love to make it easier for people to install and get started with Maizzle (and I'm open to ideas), but I can't see how it could work properly through Packagist. I'll admit my PHP knowledge is limited, so maybe I'm missing something?
Thanks!
You're right and those are important considerations.
I'd actually approach it in a combined fashion, similar to other projects that have the same issue (Laravel etc), where the actual core of Maizzle would be a package (see laravel/framework) and you have a separate project that is your skeleton that brings everything together (see laravel/laravel).
That way you get the best of both.
As you rightly identified, there would be some work needed to map the source
directory to a new location, but I believe this is achievable and will still work as intended.
This might also open up the possibility of Maizzle becoming a dependency of other projects rather than it having to be a project of its own. I already have a use-case for it in this scenario so I may be able to explore extracting it out.
Thanks Simon, appreciate the input 👍
I'll think about how this can be split considering both Jigsaw and the Webpack/NPM side of things - it's not just about source
, there are other configs to consider as well. In the meanwhile, it would be awesome to get some feedback from @damiani too. Keith? 😀
I can't think of an immediate reason why this wouldn't work, though you'd need to re-map the source
and build
directories to be in the project root somewhere, merge in a user-editable config.php
at build time (since Jigsaw's config.php
will be buried in vendor
), and set up your own npm scripts. It just might work :)
I don't want to open an issue, but man really good work! Just found about your package!
Considering tightenco/jigsaw#284 (+ other Laravel collisions), and the fact that a Node.js-only version of Maizzle is in the works (will be on NPM), I think it's best to keep this Jigsaw version of Maizzle as a project.
I will continue maintaining/updating it, but will not look into adding it to Packagist anymore.
If you set up the composer.json file sufficiently to add to Packagist, PHP/Composer users will be able to install with a single command, e.g.:
That will take care of downloading the latest tagged version of the repo and installing Composer dependencies in one step.