6 Star 24 Fork 4

宇润 / mddoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.php 828 Bytes
一键复制 编辑 原始数据 按行查看 历史
宇润 提交于 2021-04-25 13:06 . 设置为可执行文件 build.php
#!/usr/bin/env php
<?php
// 禁止非 cli 方式运行
if ('cli' !== \PHP_SAPI)
{
exit('are you ok?');
}
$fileName = __DIR__ . '/vendor/autoload.php';
if (is_file($fileName))
{
require_once $fileName;
}
else
{
$fileName = $_SERVER['PWD'] . '/vendor/autoload.php';
if (is_file($fileName))
{
require_once $fileName;
}
}
use Yurun\MdDoc\Args;
use Yurun\MdDoc\Builder;
Args::init();
$markdownPath = Args::get('markdownPath');
if (null === $markdownPath)
{
exit('-markdownPath can not be null');
}
$htmlPath = Args::get('htmlPath');
if (null === $htmlPath)
{
exit('-htmlPath can not be null');
}
$builder = new Builder($markdownPath, $htmlPath);
$templatePath = Args::get('templatePath');
if (null !== $templatePath)
{
$builder->templatePath = $templatePath;
}
$builder->build();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/yurunsoft/mddoc.git
git@gitee.com:yurunsoft/mddoc.git
yurunsoft
mddoc
mddoc
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891