0

I'm trying to create a local Bolt extension that uses extra libraries. Here is a snippet of my composer.json:

    "type": "bolt-extension",
    "require": {
        "bolt/bolt": ">=2.0.0,<3.0.0",
        "oyejorge/less.php": "~1.7"
    }

First, is it even possible/advisable to manage dependencies this way in local Bolt extensions? Or, do I need to manually include the library and autoload the files?

Secondly, what is the mechanism by which I should update the composer.json file in my extension? Should I browse to the directory and run composer update, or is there a more Bolt-y way of doing it?

4

1 回答 1

1

At present, we disable the packagist repo in you extensions/composer.json by default — due to performance.

However, in the CLI, if you change to your extension's installed directory, a composer update will pull in/update the dependency for you.

All that doesn't mean this mightn't change, I am reworking the Composer code at present, so keep an eye on the changelog.

于 2015-01-16T10:17:46.133 回答