Git Product home page Git Product logo

statamic-configurable-composer-manager's Introduction

Configurable Composer Manager for Statamic

The Configurable Composer Manager for Statamic addon allows you to make configuration changes to the Composer executable that Statamic internally uses to manage addon updates (or to even use your own version of Composer).

If you can't get Statamic to refresh your addons when developing on a Windows system - you're in the right place.

Installation

Copy the ConfigurableComposerManager folder into your site/addons folder. That should be all you have to do!

Environment Variables

Composer allows you to set a number of environment variables to override certain settings. These can be viewed here: https://getcomposer.org/doc/03-cli.md#environment-variables.

To set these environment variables using this addon, add settings similar to the following in a site/settings/addons/configurable_composer_manager.yaml configuration file:

"composer": "composer.phar"
environment-variables:
  "COMPOSER_HOME": "@composer"

You can set to new environment variables by adding items to the environment-variables configuration entry. For example, the following would set the COMPOSER_ALLOW_SUPERUSER environment variable when invoking the Composer application:

environment-variables:
    "COMPOSER_HOME": "@composer"
    "COMPOSER_ALLOW_SUPERUSER": "1"

Values That Start With @

You will notice that the default COMPOSER_HOME value starts with the @ symbol. This instructs the addon to return a path relative to your site's local directory. So the @composer value would be translated into <your site>/local/composer/.

Changing the Composer Executable

On certain systems it might be useful to change the Composer executable that is used. This can be done by modifying the composer configuration entry:

"composer": "composer.phar"

By default the composer entry is set to composer.phar, which will instruct the addon to use the Composer executable that ships with Statamic. Generally you shouldn't have to modify this, but if need to, simply set this value to the full path to the Composer executable you want to use.

A good example of when to change this is on a Windows system with a system-wide installation of Composer and the bundled Composer executable begins throwing network connection errors.

This configuration item becomes most useful when taking advantage of Statamic's environment setting interpolation: https://docs.statamic.com/environments#environment-settings.

statamic-configurable-composer-manager's People

Contributors

johnathonkoster avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.