Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

itodo (爱土豆)

NPM version build status codecov npm download

你也许喜欢随手写下TODO项:

// TODO: 不要忘记fix掉这个bug

但是你是否会完成您的承诺,在未来的某一天回头fix掉这个潜在的bug呢?没关系,itodo帮你记下您的TODO列表,并提醒你。

安装先

$ npm install itodo -g

如何用?

itodo --help // 一目了然所有相关命令

是的,最简单的用法就是itodo -i <某个项目>。生成结果如下:

my_datavjs jacksontian $itodo -i .
项目路径:/Users/jacksontian/git/itodo
您项目的TODO列表项还有:3项
类型 | 内容                                     || 文件名                                                                            
TODO | 还需要过滤node_modules目录下的文件       | 32 | /Users/jacksontian/git/itodo/lib/itodo.js                                         
hack | check for the v0.6.x "data" event        | 69 | /Users/jacksontian/git/itodo/node_modules/commander/node_modules/keypress/index.js
hack | check for the v0.6.x "newListener" event | 78 | /Users/jacksontian/git/itodo/node_modules/commander/node_modules/keypress/index.js

省略文件夹

itodo --filterDir "dir1,dir2" -i <某个项目>

默认等同 itodo --filterDir "node_modules,.git,build,dist" -i <某个项目>

手工调用

const itodo = require('itodo');

console.log('项目路径:' + input);
itodo.process(input).then((list) => {
  if (list.length) {
    console.log('您项目的TODO列表项还有:' + list.length + '项');
    var lines = [['类型', '内容', '文件名:行']];
    list.forEach(function (item) {
      lines.push([item.type, item.item, path.relative(input, item.filename) + ':' + item.lineno]);
    });
    console.log(pt.print(lines, ' | '));
  } else {
    console.log('恭喜您,项目的TODO列表为空');
  }
}, (err) => {
  if (err) {
    console.log('扫描项目出现错误:');
    console.log(err);
    return;
  }
});

爱土豆的贡献者们

$ git summary

 project  : itodo
 repo age : 10 years
 active   : 9 days
 commits  : 30
 files    : 13
 authors  : 
    28  Jackson Tian  93.3%
     1  Jason Hsieh   3.3%
     1  dead-horse    3.3%

License

The MIT license

About

TODO list

Resources

Stars

14 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages