我有一个脚本,我在phantomjs中运行,在Web浏览器中执行某些任务。我通常会这样运行:
phantomjs build.js
如何将其作为Gruntjs构建中的任务集成?
我目前正在使用grunt-shell
插件但是我无法看到phamtomjs的输出。
答案 0 :(得分:1)
如果要查看记录的输出,则需要设置stdout选项。
shell: {
phantom: {
command: 'phantomjs build.js',
options: {
stdout: true
}
}
}