mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update command line guide
This commit is contained in:
parent
8eac0a6b58
commit
6b4793b1d2
1 changed files with 7 additions and 1 deletions
|
@ -411,7 +411,7 @@ The `doc:` namespace has the tools to generate documentation for your app, API d
|
|||
|
||||
### `notes`
|
||||
|
||||
`rake notes` will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is done in files with extension `.builder`, `.rb`, `.erb`, `.haml`, `.slim`, `.css`, `.scss`, `.js`, `.coffee`, `.rake`, `.sass` and `.less` for both default and custom annotations.
|
||||
`rake notes` will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is done in files with extension `.builder`, `.rb`, `.rake`, `.yml`, `.yaml`, `.ruby`, `.css`, `.js` and `.erb` for both default and custom annotations.
|
||||
|
||||
```bash
|
||||
$ rake notes
|
||||
|
@ -425,6 +425,12 @@ app/models/school.rb:
|
|||
* [ 17] [FIXME]
|
||||
```
|
||||
|
||||
You can add support for new file extensions using `config.annotations.register_extensions` option, which receives a list of the extensions with its corresponding regex to match it up.
|
||||
|
||||
```ruby
|
||||
config.annotations.register_extensions("scss", "sass", "less") { |annotation| /\/\/\s*(#{annotation}):?\s*(.*)$/ }
|
||||
```
|
||||
|
||||
If you are looking for a specific annotation, say FIXME, you can use `rake notes:fixme`. Note that you have to lower case the annotation's name.
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in a new issue