treeware/plant

该软件包最新版本(0.1.0)没有可用的许可信息。

安装次数: 327,551

依赖项: 3

建议者: 0

安全性: 0

星标: 13

关注者: 3

分支: 0

公开问题: 4

类型:composer-plugin

0.1.0 2021-05-04 17:17 UTC

This package is not auto-updated.

Last update: 2024-09-18 10:33:54 UTC


README

它有点像 symfony/thanks,但它试图解决一个更大的问题! 气候变化危机。

开源可以对它产生积极影响。使用 Treeware,每一次捐赠都是对开源代码工作的激励。

关于 Treeware 的想法 很好,但不是很明显。这个软件包试图解决这个问题。

安装

将此软件包作为依赖项添加到您的软件包中

$ composer require treeware/plant

在您的 composer.json 文件中添加一个 extra 属性,其中至少包含一个空的 treeware 对象

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

或者使用这个方便的快捷方式

composer config extra.treeware --json {}

要更改默认输出,添加您自己的 teaserpriceGroup 属性

{
    "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
            } 
        }
    }
}

示例输出

当其他人使用 composer 要求或更新您的软件包时,会弹出一个小小的提醒。

$ 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