2017 © Pedro Peláez
 

composer-plugin vendor-plugin

Allows vendor modules to expose directories to the webroot

image

silverstripe/vendor-plugin

Allows vendor modules to expose directories to the webroot

  • Monday, June 18, 2018
  • by tractorcow
  • Repository
  • 1 Watchers
  • 3 Stars
  • 96,622 Installations
  • PHP
  • 182 Dependents
  • 0 Suggesters
  • 4 Forks
  • 7 Open issues
  • 11 Versions
  • 35 % Grown

The README.md

Silverstripe Vendor Plugin

CI Silverstripe supported module, (*1)

When installing Silverstripe modules in the vendor directory it may also be necessary to ensure certain module assets are exposed to the webroot, as the 'vendor' url prefix is blocked from web-access by default., (*2)

Example

For example, given the below module composer.json:, (*3)

{
    "name": "tractorcow/anothermodule",
    "description": "a test module",
    "type": "silverstripe-vendormodule",
    "extra": {
        "expose": [
            "client"
        ]
    },
    "require": {
        "silverstripe/vendor-plugin": "^1.0",
        "silverstripe/framework": "^4.0"
    }
}

This will be installed into the vendor/tractorcow/anothermodule folder, and a symlink will be created in resources/tractorcow/anothermodule/client, allowing the web server to serve resources from the vendor folder without exposing any code or other internal server files., (*4)

Note: The module type silverstripe-vendormodule is mandatory, as this behaviour is not enabled for libraries of other types., (*5)

Customising behaviour

By default the plugin will attempt to perform a symlink, failing back to a full filesystem copy., (*6)

If necessary, you can force the behaviour to one of the below using the SS_VENDOR_METHOD environment variable (set in your system environment prior to install):, (*7)

  • none - Disables all symlink / copy
  • copy - Performs a copy only
  • symlink - Performs a symlink only
  • junction - Uses a junction (windows only)
  • auto -> Perfrm symlink (or junction on windows), but fail over to copy.

Updating all exposed folders

A custom composer command can be run at any time to update / refresh all, (*8)

composer vendor-expose [<method>], (*9)

You can pass in one of the above methods to force a specific behaviour, otherwise the default will be chosen based on either a previously used method, or the SS_VENDOR_METHOD environment argument., (*10)

The Versions

18/06 2018

dev-master

9999999-dev

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

25/03 2018

1.3.2

1.3.2.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

25/03 2018

1.3.3

1.3.3.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

17/01 2018

1.3.1

1.3.1.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

12/01 2018

1.3.0

1.3.0.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

22/11 2017

1.2.0

1.2.0.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.1

 

The Development Requires

15/11 2017

1.1.0

1.1.0.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.1

 

The Development Requires

20/10 2017

1.0.1

1.0.1.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.1

 

The Development Requires

04/10 2017

1.0.0

1.0.0.0

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.1

 

The Development Requires

02/10 2017

dev-pulls/1/remove-none-method

dev-pulls/1/remove-none-method

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.1

 

The Development Requires

02/10 2017

dev-pulls/1/support-themes

dev-pulls/1/support-themes

Allows vendor modules to expose directories to the webroot

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.1

 

The Development Requires