alexskrypnyk/template-project-example

此包的最新版本(1.0.0)没有可用的许可证信息。

自定义器在项目测试中如何使用的一个示例

1.0.0 2024-05-26 11:07 UTC

This package is auto-updated.

Last update: 2024-09-23 04:00:40 UTC


README

如何在模板项目中使用自定义器的示例

composer create-project alexskrypnyk/template-project-example my-project

示例问题和处理的自动化测试定义在customize.php文件中。

示例问题和处理的自动化测试定义在CreateProjectTest.php文件中。

在自定义之前,模板项目的composer.json

{
    "name": "alexskrypnyk/template-project-example",
    "description": "Example of how Customizer could be used in the project",
    "type": "project",
    "require": {
        "php": ">=8.2"
    },
    "require-dev": {
        "alexskrypnyk/customizer": "^0.4",
        "composer/composer": "^2.7",
        "phpunit/phpunit": "^11.1"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "autoload-dev": {
        "psr-4": {
            "AlexSkrypnyk\\Customizer\\Tests\\": "vendor/alexskrypnyk/customizer/tests/phpunit",
            "AlexSkrypnyk\\TemplateProjectExample\\Tests\\": "tests"
        }
    },
    "config": {
        "allow-plugins": {
            "alexskrypnyk/customizer": true
        }
    }
}

和一个包含以下内容的README.md文件

Welcome to the alexskrypnyk/template-project-example example!

Some description on how to use the project.

用以下方式回答问题:

Name: acme/my-project
Description: My project
License: MIT

将产生composer.json

{
    "name": "acme/my-project",
    "description": "My project",
    "type": "project",
    "require": {
        "php": ">=8.2"
    },   
    "minimum-stability": "dev",
    "prefer-stable": true    
}

README.md文件

Welcome to the acme/my-project example!

Some description on how to use the project.