sylvainjule / kirby-locator

A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 and 4.
99 stars 15 forks source link

Follow the composer instructions #15

Closed chpio closed 5 years ago

chpio commented 5 years ago

Hi,

please follow the kirby composer instructions

Both the type field and the getkirby/composer-installer dependency are required for your plugin to work, otherwise it won't be loaded correctly by Kirby.

The setup with a separate config.php file for Composer is no longer recommended as it can cause issues with the autoloading order. If you put your code directly into the index.php file and don't autoload it with Composer, Kirby will pick it up just fine.

https://getkirby.com/docs/guide/plugins/plugin-setup-basic#the-composer-json


Also what's the purpose of adding the vendor dir to git?

sylvainjule commented 5 years ago

I am aware of the pluginkit and am trying to find some time to update my plugins accordingly. I am just missing some time at the moment. Any PR is welcome, else I am trying to get on it quickly.

The vendor folder, in this configuration, allows to clone / copy-paste the repo without the need of composer. But it's an outdated structure, judging from what Lukas put together.

sylvainjule commented 5 years ago

The plugin is now up to date ✅

chpio commented 5 years ago

nice, thank you

i think there is a copy & paste bug

   "extra": {
        "installer-name": "superplugin"
    }

should be not in the config, its purpose is to override the name of the plugin, so your plugins name gets overridden to "superplugin" right now.

sylvainjule commented 5 years ago

Duh, did it too quickly 🙉 That's fixed.