barnythorpe/clarify 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

barnythorpe/clarify

最新稳定版本:0.1.0

Composer 安装命令:

composer require barnythorpe/clarify

包简介

A CLI command for your PHP projects to convert PHPDoc into MarkDown based documentation.

README 文档

README

   ________  ___       ________  ________  ___  ________ ___    ___ 
  |\   ____\|\  \     |\   __  \|\   __  \|\  \|\  _____\\  \  /  /|
  \ \  \___|\ \  \    \ \  \|\  \ \  \|\  \ \  \ \  \__/\ \  \/  / /
   \ \  \    \ \  \    \ \   __  \ \   _  _\ \  \ \   __\\ \    / / 
    \ \  \____\ \  \____\ \  \ \  \ \  \\  \\ \  \ \  \_| \/  /  /  
     \ \_______\ \_______\ \__\ \__\ \__\\ _\\ \__\ \__\__/  / /    
      \|_______|\|_______|\|__|\|__|\|__|\|__|\|__|\|__|\___/ /     
                                                       \|___|/      

Convert PHPDoc comments into structured Markdown documentation with ease.

About

This project provides a PHP-based documentation generator that extracts PHPDoc comments from your code and converts them into Markdown files. Using a flexible configuration system, it allows you to customize the output structure with a comprehensible fluent interface.

🔧 Installation

1️⃣ Install via Composer:

composer require --dev barnythorpe/clarify

2️⃣ Run the Documentation Generator:

./vendor/bin/clarify build --config=clarify.config.php

or add to your composer.json as a script like so:

"scripts": {
   "doc": "clarify"
},

and run:

composer doc

🛠 Configuration Example

Create a config file clarify.config.php:

<?php
use Barnythorpe\clarify\DocBuilder;
use Barnythorpe\clarify\OutputStrategies\MarkdownStrategy;

return DocBuilder::make()
    ->setOutputStrategy(new MarkdownStrategy())
    ->startPage('docs/api.md'))
        ->addHeading('API Documentation', 1)
        ->addParagraph('This is an example doc.')
        ->addFile('src/Example.php')
    ->endPage();

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-12