Is there a way to configure rake:notes to parse javascript files and emit respective notes? Thanks
You can do this with grep directly if you want
grep -r 'OPTIMIZE:\|FIXME:\|TODO:' public/javascripts
If you wanted only TODO's
grep -r 'TODO:' public/javascripts # Find on todos
You could use the following to Search all js in the project, not just the files under public javascripts.
grep -r 'OPTIMIZE:\|FIXME:\|TODO:' **/*.js
Here is how you can turn this into a rake task.
# File lib/tasks/notes.rake
namespace :notes do
task :js do
puts `grep -r 'OPTIMIZE:\\|FIXME:\\|TODO:' public/javascripts`
end
end
Now you can execute rake notes:js
from the project root.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With