jake

Node.js and Jake - How to call system commands synchronously within a task?

只愿长相守 提交于 2019-12-04 12:24:56
问题 A Jake task executes a long-running system command. Another task depends on the first task being completely finished before starting. The 'exec' function of 'child_process' executes system commands asynchronously, making it possible to for the second task to begin before the first task is complete. What's the cleanest way to write the Jakefile to ensure that the long-running system command in the first task finishes before the second task starts? I've thought about using polling in a dummy

Node.js and Jake - How to call system commands synchronously within a task?

ぐ巨炮叔叔 提交于 2019-12-03 08:00:37
A Jake task executes a long-running system command. Another task depends on the first task being completely finished before starting. The 'exec' function of 'child_process' executes system commands asynchronously, making it possible to for the second task to begin before the first task is complete. What's the cleanest way to write the Jakefile to ensure that the long-running system command in the first task finishes before the second task starts? I've thought about using polling in a dummy loop at the end of the first task, but this just smells bad. It seems like there must be a better way. I

以ToDoList应用来学习Geddy

有些话、适合烂在心里 提交于 2019-11-30 09:32:18
Geddy学习笔记 初始工具安装 Node.js, Geddy, Jake 本文运行环境为Windows,Node.js安装比较简单,进入Node.js官网直接下载安装包傻瓜安装即可。 安装Geddy,打开终端cmd.exe,输入 $ npm install -g geddy 安装Jake,输入 $ npm install -g geddy jake geddy gen命令 应用例子: $ geddy gen scaffold book title:string descrption:text $ geddy gen scaffold user name:default Geddy的生成器命令包括有: app <name> secret scaffold <name> [model properties] resource <name> [model attributes] controller <name> model <name> [model attributes] 其中,这三个命令'scaffold', 'resource', 'model'包括以空格分隔的Model属性 构建一个App 新建工作目录,进入目录路径, 敲入命令: $ geddy gen app to_do 生成文件夹及文件,具体含义请参考 http://geddyjs.org/tutorial