rahmatawaludin/laravel-notes

Laravel 4 Artisan Notes Management

2.0 2014-02-19 03:30 UTC

This package is not auto-updated.

Last update: 2024-09-28 16:20:32 UTC


README

Travis Badge Coverage Status Bitdeli Badge Latest Stable Version Latest Unstable Version Total Downloads License

受Rails Rake notes启发,Laravel Notes帮助您在开发应用程序时管理笔记。它将搜索以TODO、FIXME或OPTIMIZE开头的注释。

安装

  • 更新composer.json以要求 "rahmatawaludin/laravel-notes": "dev-master"
{
  "require": {
    "laravel/framework": "4.1.*",
    "rahmatawaludin/laravel-notes": "dev-master"
  },
  ...
}
  • 在终端中运行 composer update
  • 将LaravelNotesServiceProvider 'Rahmatawaludin\LaravelNotes\LaravelNotesServiceProvider' 添加到文件 app/config/app.php 中的laravel providers数组
'providers' => array(
    ...
    'Rahmatawaludin\LaravelNotes\LaravelNotesServiceProvider'
  )

使用方法

将您的注释添加到app目录中的文件,以@TODO、@FIXME或@OPTIMIZE开头。示例

app/controllers/HomeController.php

...
// @TODO create different layout
...

app/routes.php

// @FIXME missing controller for router

app/models/User.php

/**
 * This is really important
 * @OPTIMIZE better looping for this model
 * @var string
 */

然后使用终端中的notes来查看所有笔记

$ php artisan notes

选项

  • 仅筛选一种类型
$ php artisan notes todo
  • 将自定义类型添加到默认类型
$ php artisan notes --extra-filters=foo,bar
  • 仅搜索目录内 (默认: app)
$ php artisan notes --include-path=app/views
  • 排除目录 (默认: storage)
$ php artisan notes --exclude-path=app/views

底层

Laravel Notes将检查您的平台,如果您在UNIX系统上,则运行grep。对于Windows用户,它将使用PHP读取和解析文件。非正式测试发现grep的速度快2倍。

截图

alt text

路线图

贡献

  1. 分支
  2. 在dev分支上工作
  3. 拉取
  4. 重复.. :)