与 gulp 配合
tuoxiansp opened this issue · 4 comments
tuoxiansp commented
如何与 gulp 配合使用,现在的状况是:开发一个静态页面,需要开着一个命令行窗口 gulp watch ,再开一个窗口 puer ,接着还需要一个命令行用于执行其他 npm gulp 之类的命令。能否把 gulp watch 跟 puer 合并到一个命令执行?。。
tuoxiansp commented
require('child_process').exec('puer');
试了下这么做可行。。没什么问题了。。
leeluolee commented
其实puer 有API。。。 不一定要 spawn 一个子进程
tuoxiansp commented
-,- 你终于出现了
tuoxiansp commented
var puer = require('puer');
puer();
撸了个新项目,算是搞定了上次的问题。