{"id":13669496,"url":"https://github.com/taskphp/task","last_synced_at":"2025-04-27T04:33:17.579Z","repository":{"id":15303235,"uuid":"18033026","full_name":"taskphp/task","owner":"taskphp","description":"Pure PHP task runner","archived":false,"fork":false,"pushed_at":"2016-05-07T09:39:48.000Z","size":124,"stargazers_count":183,"open_issues_count":4,"forks_count":15,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-02T08:08:20.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taskphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-23T12:39:20.000Z","updated_at":"2023-11-23T15:18:39.000Z","dependencies_parsed_at":"2022-08-25T15:21:41.975Z","dependency_job_id":null,"html_url":"https://github.com/taskphp/task","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskphp%2Ftask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskphp%2Ftask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskphp%2Ftask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskphp%2Ftask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskphp","download_url":"https://codeload.github.com/taskphp/task/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224060341,"owners_count":17249002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T08:01:15.561Z","updated_at":"2024-11-11T06:30:27.200Z","avatar_url":"https://github.com/taskphp.png","language":"PHP","funding_links":[],"categories":["PHP","类库","Table of Contents"],"sub_categories":["任务","Globalization"],"readme":"task/task\n=========\n\n[![Build Status](https://travis-ci.org/taskphp/task.svg?branch=master)](https://travis-ci.org/taskphp/task)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/taskphp/task/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/taskphp/task/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/taskphp/task/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/taskphp/task/?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/task/task/v/stable.png)](https://packagist.org/packages/task/task)\n[![Total Downloads](https://poser.pugx.org/task/task/downloads.png)](https://packagist.org/packages/task/task)\n[![Latest Unstable Version](https://poser.pugx.org/task/task/v/unstable.png)](https://packagist.org/packages/task/task)\n[![License](https://poser.pugx.org/task/task/license.png)](https://packagist.org/packages/task/task)\n\nGot a PHP project? Heard of Grunt and Gulp but don't use NodeJS?  Task is a pure PHP task runner.\n\n* Leverage PHP as a scripting language, and as your platform of choice.\n* Use loads of nice features inspired by Grunt and Gulp (and Phing).\n* Employ Symfony components for effortless CLI goodness.\n* Extend with plugins.\n\nFor more information and documentation goto [taskphp.github.io](http://taskphp.github.io), or tweet us at [@taskphp](https://twitter.com/taskphp).\n\nExample\n=======\n\n```php\n\u003c?php\n\nuse Task\\Plugin;\n\nrequire 'vendor/autoload.php';\n\n$project = new Task\\Project('wow');\n\n$project-\u003einject(function ($container) {\n    $container['phpspec'] = new Plugin\\PhpSpecPlugin;\n    $container['fs'] = new Plugin\\FilesystemPlugin;\n    $container['sass'] = (new Plugin\\Sass\\ScssPlugin)\n        -\u003esetPrefix('sass');\n    $container['watch'] = new Plugin\\WatchPlugin;\n});\n\n$project-\u003eaddTask('greet', function () {\n    $this-\u003egetOutput()-\u003ewriteln('Hello, World!');\n});\n\n$project-\u003eaddTask('test', ['phpspec', function ($phpspec) {\n    $phpspec-\u003ecommand('run')\n        -\u003esetFormat('pretty')\n        -\u003esetVerbose(true)\n        -\u003epipe($this-\u003egetOutput());\n}]);\n\n$project-\u003eaddTask('css', ['fs', 'sass', function ($fs, $sass) {\n    fs-\u003eopen('my.scss')\n        -\u003epipe($sass)\n        -\u003epipe($fs-\u003etouch('my.css'));\n}]);\n\n$project-\u003eaddTask('css.watch', ['watch', function ($watch) {\n    $watch-\u003einit('my.scss')\n        -\u003eaddListener('modify', function ($event) {\n            $this-\u003erunTask('css', $this-\u003egetOutput());\n        })\n        -\u003estart();\n}]);\n\nreturn $project;\n```\n\n```bash\n$\u003e task greet\nHello, World!\n\n$\u003e task test\n\n      Task\\Injector\n\n  17  ✔ is initializable\n  22  ✔ should call function with services\n\n      Task\\Project\n\n  10  ✔ is initializable\n  20  ✔ should have a container\n  26  ✔ should resolve no dependencies\n  32  ✔ should resolve one dependency\n  39  ✔ should resolve many dependencies\n  50  ✔ should normalize dependencies\n  58  ✔ should normalize complex dependencies\n\n\n2 specs\n9 examples (9 passed)\n29ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskphp%2Ftask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskphp%2Ftask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskphp%2Ftask/lists"}