-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Install cockpit as a composer dependency #261
Comments
hi, the only possible way I can think of are composer scripts: https://getcomposer.org/doc/articles/scripts.md |
Hi, I think if cockpit is intended to be for developers, it should be easy to install and update with developers tools (composer pour PHP). I think your point (am I wrong) is to make easy to use, juste copy/paste and launch a webserver, but for many developpers like, we want to be able to add the cockpit code to .gitignore and we want it to be outside the public path, update it easily with composer and custom some paths (cache, storage). I've tried some things, override some consts and symlink assets, but I've not the required knowledge of how the CSM is organised to make this work. May be you should consider having two install methods ? one with composer with the ability to custom paths and one copy/paste method. Thanks |
I agree with @youknowriad , you should provide way to customize paths for cockpit out of the box. For example currently I see one problem: you define Maybe you should exclude this file from autoloading, or at least maybe create separate repository that can be used for composer dependecies, and another repository for installing cockpit as standalone application |
I've got idea. If there would a package type publicFolder with destination of public subfolder (
then using composer it should get installed to |
@piotr-cz Not a bad idea |
Maybe cleaner way is to register cockpit installer type for composer. Cockpit application {
"name": "aheinze/cockpit",
"type": "cockpit-core",
"extra": {
"installer-name": "cockpit"
}
} Example module {
"name": "verdorName/FooBar",
"type": "cockpit-module",
"extra": {
"installer-name": "FooBar"
}
} Downside is that the public folder should be pre-set (hardcoded) in the installer type. If you are wondering, why there is an |
@piotr-cz awesome |
I vote for |
do I need to change anything in cockpits composer.json? |
I'm not sure I understood correctly the purpose of BTW: All of this is theory, I haven't tried it out. |
Another option would be to create an installer similar to Laravel installer (GitHub repo, Docs) or Lumen installer (GitHub repo, Docs). |
This would be idea for us, since we build our websites with Laravel, we just want to use the helper methods |
One more and maybe most easiest option is to treat Cockpit like a frontend component (jQuery/ Bootstrap) using Component Installer for Composer So in projects {
"require": {
"components/cockpit": "~0.13"
}
} |
Any updates on this one? Maybe an idea to do it like Bedrock does for Wordpress? See:
|
Relevant to this issue: mnsami/composer-custom-directory-installer#11 |
I've added support for Cockpit modules as composer installers. See composer/installers#284 for details. |
So, what is the process for installing Cockpit as a Composer dependency? For example I want to use Cockpit as a CMS for Laravel, since it is a 3rd party package it should be installed to the vendor folder, and not manually copied to the public folder. The Cockpit storage folder can/should exist in the public folder however. What is the correct way of doing this? |
Hi, Is there a way yo install cockpit as a composer dependency and have the custom config outside the vendor folder.
Thanks a lot
The text was updated successfully, but these errors were encountered: