-
Notifications
You must be signed in to change notification settings - Fork 50
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
Allow changing vendor path for package output #297
Conversation
Referenced from this issue: #288 |
This still needs additional work though. It covers the build paths in the composer.json but it doesn't cover the case of moving the vendor directory and updating the autoload.php. |
Yeah, needs a lot more work. When testing, the composer.json that ended up in the package was still the original. The current PR modifies the composer.json in the root instead of the one being packaged. |
OK, updated this PR. Added a new Gruntconfig.json option: packages : dest : "vendor" You can set this to the desired location of the /vendor directory. If left out or empty the composer.json will be saved to the normal buildPaths.html. If "vendor" is used, it is a relative path to the buildPaths.html that specifies where to place the composer.json file. The installer-paths in the composer.json are updated based on the settings of both the packages.dest.docroot as well as packages.dest.vendor. When the vendor is set, the installer-paths need to be made relative to the location of composer. So, a simple test case: "docroot": "docroot", This will put the composer.json within packages/package/docroot which is where the vendor directory will get created, and the installer-paths generate from that same directory. This would be the typical setup for Acquia. Another contrived example: "docroot": "build/html", This puts composer.json into the packages/package/build folder, but sets the installer-paths to "html/*". This would let the web server point to /build/html but have the vendor directory in /build which might still be within the hosting file structure. |
…enerated if needed, and allow packages.dest configuration to be optional.
@mike-potter Thanks for taking this up! The test cases you listed are good ones, but I'd simplify them slightly:
When testing these two configurations, I found a few issues:
I'll submit a PR against this branch with updates that I'm testing to resolve these issues. |
…updates Updates to feature/package_rewrite_composer
There we go...travis is passing now. Seems to be a bit flaky these days and just re-running the builds worked. Adam is out for 3 weeks so I'm going to ping Jonathan for a review/test and then we can commit this. I'll be working on some docs but hope we can do the 1.0 milestone very soon. |
This looks good to me. @arithmetric any further feedback here? |
I think this is ready to go. I'll push out another alpha release with this. Let's make sure documentation is up-to-date (address #271) and aim to release 1.0.0 in the next couple weeks. |
I'm going to work on the documentation today and later this week. I really want to push the 1.0.0 release asap because we have D8 projects that need the composer support and the current projects using gdt "^0.11.0" are not seeing any of these "alpha" releases, even though there is nothing in them that would break existing drush-make-based projects. |
I implemented the approach suggested by arithmetic. Comments welcome.