2017 © Pedro Peláez
 

composer-plugin drupal-copy-profile

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

image

digipolisgent/drupal-copy-profile

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  • Wednesday, December 6, 2017
  • by zero2one
  • Repository
  • 3 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

drupal-copy-profile

Latest Stable Version Latest Unstable Version Total Downloads License, (*1)

Build Status Maintainability Test Coverage PHP 7 ready, (*2)

Composer plugin to assist in installation profile development. This allows the install profile to be used as if your project is like drupal-composer/drupal-project, with your project being an install profile to test and being the root project., (*3)

Credits

This project is basically a rip-off of drupal-composer/drupal-scaffold. Thanks to the developers of that package for the inspiration., (*4)

Usage

Run composer require --dev digipolisgent/drupal-copy-profile:dev-master in your composer project before installing or updating drupal/core., (*5)

Once drupal-copy-profile is required by your project, it will automatically copy the install profile in the project directory to the correct profiles directory in an installed drupal site., (*6)

You can use this easily by requiring these packages in the require-dev section of the composer.json., (*7)

  • drupal/core
  • composer/installers
  • drupal-composer/drupal-scaffold

You'll also have to configure the drupal-scaffold paths as follows:, (*8)

    "extra": {
        "installer-paths": {
            "web/core": ["type:drupal-core"],
            "web/libraries/{$name}": ["type:drupal-library"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            "web/profiles/contrib/{$name}": ["type:drupal-profile"],
            "web/themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/contrib/{$name}": ["type:drupal-drush"]
        },
    }

Configuration

You can configure the plugin with providing some settings in the extra section of your root composer.json., (*9)

{
  "extra": {
    "drupal-copy-profile": {
      "excludes": [
        "scripts"
      ],
      "profile-name": "lightning",
      "web-root": "www",
      "omit-defaults": false
    }
  }
}

With the drupal-copy-profile option excludes, you can provide additional paths that should not be copied from the root project. The plugin provides these default includes:, (*10)

web-root
vendor-path
.git

web-root is configurable through the options, but defaults to the location where drupal/core is installed. vendor-path is taken from the composer config and defaults to vendor, (*11)

When setting omit-defaults to true, the default excludes will not be used; in this instance, only those files explicitly listed in the excludes options will be considered. If omit-defaults is false (the default), then any items listed in excludes will be in addition to the usual defaults., (*12)

The profile-name option allows you to set the install profile name. It defaults to the project name of the root package (the second part of the package name), (*13)

The web-root option allows you to set an alternative path to copy the profile to. It defaults to the install location of drupal/core, which should be fine., (*14)

Custom command

The plugin by default is executed on each composer install and update. If you want to call it manually, you can add the command callback to the scripts-section of your root composer.json, like this:, (*15)

{
  "scripts": {
    "drupal-copy-profile": "DigipolisGent\\DrupalCopyProfile\\Plugin::copyProfile"
  }
}

After that you can manually copy the profile according to your configuration by using composer drupal-scaffold., (*16)

The Versions

06/12 2017

dev-master

9999999-dev

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme

06/12 2017

1.0.0-beta1

1.0.0.0-beta1

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme

06/12 2017

dev-develop

dev-develop

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme

22/05 2017

1.0.0-alpha2

1.0.0.0-alpha2

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme

22/05 2017

dev-feature/fix-tests

dev-feature/fix-tests

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme

02/02 2017

1.0.0-alpha1

1.0.0.0-alpha1

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme

02/02 2017

dev-feature/PSR-2

dev-feature/PSR-2

Can be used as a development in an install profile to copy the current profile in a web directory, so it can be used similary as drupal-composer/drupal-project.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4.5
  • composer-plugin-api ^1.0.0

 

The Development Requires

by Dieter Blomme