0

使用 yeoman navdrawer 模板构建 Oracle Jet 应用程序并尝试编写一些我需要执行的公共任务(例如:构建、部署在远程服务器上……)。

如果我使用以下内容在 Windows 上创建 test.bat:

grunt build
echo "next command is an echo"

回显命令未执行

Running "build" task

Running "oraclejet-build:undefined" (oraclejet-build) task
 Oracle JET Grunt plugin
Processing Grunt command...
JET Warning: Missing platform. Default to web.
 Oracle JET Tooling
cleaning staging path.....
copy files to staging directory.....
copy finished...
copy library files to staging directory.....
copy finished...
compiling sass....
sass compile finished...
running theme injection task.....
indexHtml theme path injection finished..
running theme copy task.....
theme copy finished...
running injection task.....
mainJs paths injection finished..

Done.

它返回命令行..

为什么它不执行 echo 命令?

4

1 回答 1

0

在另一个帖子中找到

grunt 执行停止批处理脚本

必须使用 call 使其工作

call grunt build
echo "it works!"
于 2017-05-22T17:00:18.993 回答