treeware/plant

There is no license information available for the latest version (0.1.0) of this package.

Installs: 334 036

Dependents: 3

Suggesters: 0

Security: 0

Stars: 13

Watchers: 3

Forks: 0

Open Issues: 4

Type:composer-plugin

0.1.0 2021-05-04 17:17 UTC

This package is not auto-updated.

Last update: 2024-12-11 11:41:15 UTC


README

It's a bit like symfony/thanks, but it tries to tackle a bigger problem! The climate crisis.

Open Source can have positive impact on it. With Treeware every donation is a motivation to work on Open Source code.

The Treeware idea is great, but it's not very visible. This package tries to solve it.

Install

Add this package as dependency to your package:

$ composer require treeware/plant

Add an extra attribute to your package composer.json that contains at least an empty treeware object:

{
    "extra": {
        "treeware": {}
    }
}

Or use this handy shortcut:

composer config extra.treeware --json {}

To change the default output, add your own teaser and priceGroup properties:

{
    "extra": {
        "treeware": {
            "teaser": [
              "Your message to the consumers of your package to convince them.",
              "Multiple lines are possible, but not more than 3 lines and 200 characters."
            ],
            "priceGroups": {
              "useful": 100,
              "important": 250,
              "critical": 500
            } 
        }
    }
}

Example output

When others require or update your package using composer, a tiny reminder pops up.

$ composer require this/fancy-package

Using version dev-master for this/fancy-package
./composer.json has been updated
Running composer update this/fancy-package
Loading composer repositories with package information
Updating dependencies
Generating autoload files


๐ŸŒณ Treeware licence of this/fancy-package - A cool package
๐ŸŒณ -------------------------------------------------------------------
๐ŸŒณ The author of this open-source software cares about the climate crisis.
๐ŸŒณ Using the software in a commercial project requires a donation:
๐ŸŒณ โค‘ 100 trees โ‰ˆ $17 (useful)
๐ŸŒณ โค‘ 250 trees โ‰ˆ $42 (important)
๐ŸŒณ โค‘ 500 trees โ‰ˆ $84 (critical)
๐ŸŒณ Donate using this link: https://plant.treeware.earth/this/fancy-package