PHPackages                             nuvoleweb/drupal-component-scaffold - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nuvoleweb/drupal-component-scaffold

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

nuvoleweb/drupal-component-scaffold
===================================

Scaffolding Composer plugin for Drupal modules and themes.

0.1.0(8y ago)12832[1 issues](https://github.com/nuvoleweb/drupal-component-scaffold/issues)2GPL-2.0+PHPPHP &gt;=5.6

Since Oct 9Pushed 8y ago2 watchersCompare

[ Source](https://github.com/nuvoleweb/drupal-component-scaffold)[ Packagist](https://packagist.org/packages/nuvoleweb/drupal-component-scaffold)[ RSS](/packages/nuvoleweb-drupal-component-scaffold/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (8)Versions (2)Used By (2)

Drupal Component Scaffold
=========================

[](#drupal-component-scaffold)

[![Build Status](https://camo.githubusercontent.com/9ba5532cf58a4c4882c89ac46319b54caf228f3578e3e02f89e78bcda5e6ba4c/68747470733a2f2f7472617669732d63692e6f72672f6e75766f6c657765622f64727570616c2d636f6d706f6e656e742d73636166666f6c642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nuvoleweb/drupal-component-scaffold)

*Drupal Component Scaffold* is a [Composer plugin](https://getcomposer.org/doc/articles/plugins.md) that helps Drupal 8 project maintainers enjoy leaner development workflow: working on modules and themes will be like working on any other modern PHP component.

Once installed the plugin allows to:

- Specify all project's development dependencies in `require-dev`, like Drupal core, modules, themes or any needed testing libraries (PHPUnit, PHPSpec, Behat, etc.). [See an example here](https://github.com/nuvoleweb/ui_patterns/blob/8.x-1.x/composer.json).
- Build a fully functional Drupal site right within the project directory by bundling all listed dependencies by just running `composer install`.
- Have the same setup on both local development and continuous integration pipelines. This also leads to [cleaner CI configuration files](https://github.com/nuvoleweb/ui_patterns/blob/8.x-1.x/.travis.yml).

The plugin leverages the excellent [Drupal Scaffold](https://github.com/drupal-composer/drupal-scaffold) project and fires only after (and if) its main scaffolding tasks are ran.

Usage
-----

[](#usage)

Require it via Composer as follow:

```
$ composer require nuvoleweb/drupal-component-scaffold --dev

```

List all your dependencies (core version, modules, etc.) and run:

```
$ composer update

```

For example, take the following `composer.json`:

```
{
  "name": "drupal/my_module",
  "type": "drupal-module",
  "require": {
    "drupal/ds": "~3"
  },
  "require-dev": {
    "nuvoleweb/drupal-component-scaffold": "*",
    "drush/drush": "~8.0",
    "drupal/core": "~8",
    "drupal/panels": "~4",
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    }
  ],
  "extra": {
    "installer-paths": {
      "web/core": ["type:drupal-core"],
      "web/modules/contrib/{$name}": ["type:drupal-module"]
    }
  }
}
```

Running `composer install` will result in:

```
.
├── web
│   ├── autoload.php
│   ├── core
│   ├── modules
│   │   ├── contrib
│   │   │    └── panels
│   │   └── custom
│   │       └── my_module (symlink to project root)
│   └── sites
│       ├── default
│       │   ├── default.services.yml
│       │   ├── default.settings.php
│       │   ├── drushrc.php
│       │   └── settings.local.php
│       ├── development.services.yml
│       ├── example.settings.local.php
│       └── example.sites.php
├── vendor
├── composer.json
├── composer.lock
├── my_module.info.yml
└── my_module.module

```

Configuration
-------------

[](#configuration)

Build directory will be derived by the `installer-paths`, make sure you specify there where you wish to install your core, modules etc:

```
{
  "extra": {
    "installer-paths": {
      "web/core": ["type:drupal-core"],
      "web/modules/contrib/{$name}": ["type:drupal-module"]
    }
  }
}
```

Also, all options for [Drupal Scaffold](https://github.com/drupal-composer/drupal-scaffold) still apply, check the project's documentation for more.

Component scaffolding can be triggered at any time by running:

```
$ composer drupal-component-scaffold

```

Setup PHPUnit tests
-------------------

[](#setup-phpunit-tests)

To setup [PHPUnit](https://phpunit.de) use the following `phpunit.xml.dist` template:

```

      ./tests/

```

This will ensure that both [Unit and Kernel](https://www.drupal.org/docs/8/testing/types-of-tests-in-drupal-8) tests tests will ran correctly. [See an example here](https://github.com/nuvoleweb/ui_patterns/blob/8.x-1.x/phpunit.xml.dist).

Inner workings
--------------

[](#inner-workings)

When fired the plugin will:

- Setup [Composer Installers](https://github.com/composer/installers) paths.
- Register a post-[Drupal Scaffold](https://github.com/drupal-composer/drupal-scaffold) event handler.

After Drupal Scaffold is done the plugin will:

- Prepare a custom projects directory at `./web/modules/custom`.
- Make `./web/sites/default` writable.
- Symlink your project at `./web/modules/custom/my_module` (or at `./web/themes/custom/my_theme`).
- Setup default Drush configuration file at `./web/sites/default/drushrc.php`.
- Make sure that Twig cache is disabled on `./web/sites/development.services.yml`.
- Setup local development settings at `./web/sites/default/settings.local.php`.
- Patch Drupal core with [kernel-test-base.patch](dist/kernel-test-base.patch) allowing Kernel tests to run smoothly.

Note: the local development settings file above is disabled by default, to enable it un-comment the related lines in your `settings.php` file and clear the cache.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3179d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/153362?v=4)[Antonio De Marco](/maintainers/ademarco)[@ademarco](https://github.com/ademarco)

---

Top Contributors

[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (22 commits)")[![jfhovinne](https://avatars.githubusercontent.com/u/428556?v=4)](https://github.com/jfhovinne "jfhovinne (2 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (1 commits)")

---

Tags

composer-plugindrupaldrupal-8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nuvoleweb-drupal-component-scaffold/health.svg)

```
[![Health](https://phpackages.com/badges/nuvoleweb-drupal-component-scaffold/health.svg)](https://phpackages.com/packages/nuvoleweb-drupal-component-scaffold)
```

###  Alternatives

[mautic/core

Mautic Open Source Distribution

9.8k2.6k9](/packages/mautic-core)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[altis/core

Core module for Altis

19222.5k2](/packages/altis-core)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M526](/packages/drupal-core-composer-scaffold)[mediawiki/maps

Adds various mapping features to MediaWiki

78149.7k3](/packages/mediawiki-maps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
