inmarelibero/gitignore-checker 问题修复 & 功能扩展

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

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

inmarelibero/gitignore-checker

最新稳定版本:1.0.4

Composer 安装命令:

composer require inmarelibero/gitignore-checker

包简介

A PHP library to check if a path is ignored by GIT

README 文档

README

GitignoreChecker is a PHP library to check if a given paths is ignored by GIT.

USAGE

Initialize an object, providing the GIT repository root folder:

$gitIgnoreChecker = new GitIgnoreChecker(__DIR__);

You can now easily check if a given path is ignored by some .gitignore rule, with:

 $gitIgnoreChecker->isPathIgnored('/foo');  // true|false
 $gitIgnoreChecker->isPathIgnored('/README');
 $gitIgnoreChecker->isPathIgnored('/foo/bar');
 $gitIgnoreChecker->isPathIgnored('/foo/bar/baz');
 $gitIgnoreChecker->isPathIgnored('/.foo');
 ...

RUN TESTS

After making sure you installed dependencies with command composer install, you can run tests by executing:

php bin/phpunit

or executing:

composer test

Todo:

  • do more tests: figure out some more cases and edge cases and add them to the current test suite

Done:

  • handled most common gitignore, including the ones:
    • including subfolders, eg.foo/bar
    • including *, eg.foo/*/bar
    • including **, eg.foo/**/bar
    • beginning with !
    • beginning with #
    • beginning with \#

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-04