treeware/plant

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

Installs: 156 223

Dependents: 5

Suggesters: 0

Security: 0

Stars: 12

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: 2022-09-21 00:29:31 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