出题:写一个命令行工具
发布于 9 年前 作者 i5ting 3358 次浏览 最后一次编辑是 8 年前 来自 问答

要求,执行

adbclear com.example.sang.helloworld

等于

adb shell pm clear com.example.sang.helloworld

核心

  • package.json里配置全局命令
  • argv读取
  • 发布到npmjs.org上(注意名字adbclear是不能一样的)

想写的同学,把代码放到github上,此贴回复链接,然后我来review一下

8 回复
alias adbclear='adb shell pm clear'

开个张 :)

@leapon 哈哈,太偷懒了

可以参照 https://github.com/i5ting/node-cli-tmpl 然后改,确实很简单的

lz 你真闲 any points in this?

@russj 无任何难点,因为难点都在https://github.com/i5ting/node-cli-tmpl 里了,只是填空

@leapon 好吧,下次来点高级的

回到顶部