PHPackages                             helsingborg-stad/builder - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. helsingborg-stad/builder

ActiveComposer-plugin[DevOps &amp; Deployment](/categories/devops)

helsingborg-stad/builder
========================

Executes build commands and cleanup files

v1.0.4(4y ago)011MITPHPPHP &gt;=7.4.0

Since Jun 28Pushed 4y ago4 watchersCompare

[ Source](https://github.com/helsingborg-stad/builder)[ Packagist](https://packagist.org/packages/helsingborg-stad/builder)[ RSS](/packages/helsingborg-stad-builder/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

[![Contributors](https://camo.githubusercontent.com/bb826cd873859ce07c2895fc88092216540a68dcd35dd9660fbd3a38a03e5ed6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f68656c73696e67626f72672d737461642f6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/helsingborg-stad/builder/graphs/contributors)[![Forks](https://camo.githubusercontent.com/0c3e1ff509cba874970ed91bc34dde5fbe60c1ccb0b0344af62592ad0582b3c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f68656c73696e67626f72672d737461642f6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/helsingborg-stad/builder/network/members)[![Stargazers](https://camo.githubusercontent.com/cdfcb72239bf990d04e87d5c07fbeeb800a591030fb1a8eff52915b7fb3a170b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f68656c73696e67626f72672d737461642f6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/helsingborg-stad/builder/stargazers)[![Issues](https://camo.githubusercontent.com/ec45df109cde57423310a0ec700552b5c3ad41aef4e878ab86a4e0e8c1b1a914/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f68656c73696e67626f72672d737461642f6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/helsingborg-stad/builder/issues)[![License](https://camo.githubusercontent.com/731794f180a349dd72432b60f923e0147e9b7db8af4f85950a2a8867e332dd78/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f68656c73696e67626f72672d737461642f6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://raw.githubusercontent.com/helsingborg-stad/builder/master/LICENSE)

 [ ![Logo](images/hbg-github-logo-combo.png) ](https://github.com/helsingborg-stad/builder)

Builder
=======

[](#builder)

 Composer builder plugin
 [Report Bug](https://github.com/helsingborg-stad/builder/issues) · [Request Feature](https://github.com/helsingborg-stad/builder/issues)

Summary
-------

[](#summary)

This composer plugin will check for build and cleanup configuration on composer packages that is being installed from the same composer.json file. The intended usage for this is in build pipeline and local development environment.

Requirements
------------

[](#requirements)

- [PHP 7.4 or higher](https://www.php.net/)

Install
-------

[](#install)

```
composer require helsingborg-stad/builder
```

Build command
-------------

[](#build-command)

I any composer package that need to be built the below should be in composer.json file like this.

```
{
    "extra": {
        "builder": {
            "commands": [
                "npm ci",
                "npm run build",
            ]
        }
    }
}
```

Cleanup
-------

[](#cleanup)

Any files that should be cleaned up after build in required packages should be in the composer.json file like this.

```
{
    "extra": {
        "builder": {
            "removables": [
                ".git",
                ".gitignore"
            ]
        }
    }
}
```

### Pipeline commands example

[](#pipeline-commands-example)

When running build for production the enable cleanup config should be enabled before install.
This should BE USED WITH CAUTION as it will delete files from your system and the setting should not be commited but added during build in a pipeline.

```
composer config extra.builder.cleanup true
composer install
```

This will be added in the composer.json

```
    "extra": {
        "builder": {
            "cleanup": "true"
        }
    }
```

### Run tests

[](#run-tests)

```
composer install
composer run test
```

Roadmap
-------

[](#roadmap)

See the [open issues](https://github.com/helsingborg-stad/builder/issues) for a list of proposed features (and known issues).

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

License
-------

[](#license)

Distributed under the [MIT License](https://raw.githubusercontent.com/helsingborg-stad/builder/master/LICENSE).

Acknowledgements
----------------

[](#acknowledgements)

- [othneildrew Best README Template](https://github.com/othneildrew/Best-README-Template)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Every ~0 days

Total

5

Last Release

1463d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f46fe64973c3e89d15c745c0bf601c25983bafea81d30e64d4bf813a6f8c8c7c?d=identicon)[sebastianthulin](/maintainers/sebastianthulin)

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/helsingborg-stad-builder/health.svg)

```
[![Health](https://phpackages.com/badges/helsingborg-stad-builder/health.svg)](https://phpackages.com/packages/helsingborg-stad-builder)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[johnpbloch/wordpress-core-installer

A custom installer to handle deploying WordPress with composer

21911.3M51](/packages/johnpbloch-wordpress-core-installer)[roots/wordpress-core-installer

A Composer custom installer to handle installing WordPress as a dependency

4216.6M50](/packages/roots-wordpress-core-installer)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M558](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M202](/packages/drupal-core-project-message)

PHPackages © 2026

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