xantios/maple

带有Maple甜美味道的任务执行器

v1.0.3 2021-07-10 13:27 UTC

This package is auto-updated.

Last update: 2024-09-10 22:01:20 UTC


README

Build Status Total Downloads Latest Stable Version License

Maple Logo

欢迎来到Maple!

Maple提供了您一直想要但从未敢问津的任务执行器。

生产使用注意事项

Maple目前处于积极开发状态(可以说是beta状态),如果您是那些勇敢者之一(如果您是,请告诉我您在生产中的使用感受!),可以用于生产。

按项目安装

只需常规依赖项即可!

composer require xantios/maple

运行composer后,将maple-config.php添加到您的项目工作目录,并运行

vendor/bin/maple

全局安装

如果您经常使用Maple,也许可以全局安装它。使用composer global require xantios/maple即可!

运行maple命令时,请确保您的当前目录中有配置文件。

配置

配置文件是一个简单的PHP数组,它相当直观。

<?php

return [
    // Host to listen on (defaults to 127.0.0.1)
    # 'host' => '0.0.0.0',

    // Port for web interface to listen on (defaults to 8100)
    # 'port' => 8100,
    
    // Verbose logging
    'verbose' => true,
    
    // Tasks available 
    'tasks' => [
        [
            'name' => "Run webpack",
            'retries' => 0,
            'autostart' => true,
            'cmd' => 'npm run dev'
        ],
        [
            'name' => "Some process that keeps on exiting but needs to be running",
            'retries' => -1,
            'autostart' => true,
            'cmd' => 'ping -t 3 8.8.8.8 ; sleep 5'
        ],
        // Run multiple tasks back-to-back 
        [
            'name' => 'Jan-1',
            'after' => 'Jan-2',
            'autostart' => true,
            'cmd' => 'sleep 1',
        ],
        [
            'name' => 'Jan-2',
            'after' => 'Jan-3',
            'cmd' => 'sleep 1',
        ],
        [
            'name' => 'Jan-3',
            'after' => '',
            'cmd' => 'sleep 1',
        ]
    ]
];

Web界面

有一个仪表板在http://localhost:8100可用,外观如下

Screenshot

代码贡献

感谢您考虑贡献,您可以自由地提交您喜欢的任何内容或创建一个问题,如果您认为您有一个很好的想法!

其他方式的贡献

感谢邮件、捐赠、照片(展示您的软件如何改变您的生活)和咖啡豆袋欢迎发送至 git@xantios.nl

安全漏洞

如果您在Maple中发现安全漏洞,请发送电子邮件至Xantios Krugor git@xantios.nl 所有安全漏洞都将得到及时处理。

许可协议

Maple是开源软件,许可协议为MIT协议