1 Star 1 Fork 0

swoft / swoft-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
phar.build.inc 1.06 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
inhere 提交于 2019-08-11 23:47 . complete component create commamd
<?php
/**
* The is a config file for compile phar package.
* User: Inhere
* Date: 2018/1/26 22:11
* @var \Swoft\Console\Advanced\PharCompiler $compiler
*/
// config
$compiler
->stripComments(true)
->setShebang(true)
->addSuffix(['.tpl', '.json', '.stub'])
->addExcludeDir([
'test',
'doc',
'docs',
'tests',
'Tests',
'example',
'runtime',
'swoole-ide-helper',
])
->addFile([
// 'LICENSE',
'composer.json',
'README.md',
'bin/bootstrap.php',
])
->setCliIndex('bin/swoftcli')
// ->setWebIndex('web/index.php')
// ->setVersionFile('config/config.php')
;
$stripDirs = [
'psr/',
'nikic/',
'monolog/',
'symfony/',
'toolkit/',
];
// Swoft 相关都不能去除注释
$compiler->setStripFilter(function ($file) use ($stripDirs) {
/** @var \SplFileInfo $file */
$path = $file->getPathname();
foreach ($stripDirs as $dir) {
if (\strpos($path, $dir)) {
return true;
}
}
return false;
});
1
https://gitee.com/swoft/swoft-cli.git
git@gitee.com:swoft/swoft-cli.git
swoft
swoft-cli
swoft-cli
master

搜索帮助