跳到主要内容
CNode

出题:写一个命令行工具

问答
Ii5ting发布于 11 年前最后回复 11 年前
840740

要求,执行

adbclear com.example.sang.helloworld

等于

adb shell pm clear com.example.sang.helloworld

核心

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

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

查看回复

回复 (8)

Y
yaochun#811 年前
引用 leapon

@leapon 调皮

I
i5ting#711 年前
引用 leapon@russj 是咸的 :)

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

I
i5ting#611 年前
引用 russjlz 你真闲 any points in this?

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

L
leapon#511 年前
引用 russjlz 你真闲 any points in this?

@russj 是咸的 :)

R
russj#411 年前

lz 你真闲 any points in this?

I
i5ting#311 年前
引用 leapon

@leapon 哈哈,太偷懒了

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

L
leapon#211 年前

开个张 :)

L
leapon#111 年前
alias adbclear='adb shell pm clear'

参与回复

登录后即可参与回复。登录