Runfile: Makefile 的 Node.js 版本

2015-10-24 19:35:13 +08:00
 sox

造轮子混脸熟 :(

用 shell.js 造的 Node.js 版本 Makefile

GitHub 地址 | NPM

举个 Runfile 栗子:

var task = module.exports = {}

task.clean = () => {
  rm('-rf', 'testFolder')
  rm('-rf', 'testSource')
}

// or run external tools
task.deploy = (argv) => {
  var message = argv.m || 'update'
  exec('git add -A')
  exec(`git commit -m "${message}"`)
  exec('git push origin master')
}

task.default = ['clean', 'deploy']
1947 次点击
所在节点    分享创造
7 条回复
sox
2015-10-24 19:36:28 +08:00
@Livid V2EX 的 Markdown 渲染应该更新了 :(
sox
2015-10-25 00:59:42 +08:00
大概长这样

msg7086
2015-10-29 01:36:59 +08:00
stare
英[stɛə] 美[stɛr]
n. 凝视;注视;瞪眼
v. 盯;凝视;注视
词形变化: starer stared stared staring stares
sox
2015-10-29 07:27:48 +08:00
@msg7086 蛤?
msg7086
2015-10-29 13:28:41 +08:00
不是你自己写的 Staring 么
sox
2015-10-29 14:26:36 +08:00
@msg7086 ...我觉得你直接说 line 10 少些了个 t 会比较容易懂 :)
msg7086
2015-10-29 21:11:46 +08:00
盯着 'deploy' 看……

其实还挺萌的。(?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/230768

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX