1. grunt ,显示:
然后我按照终端推荐,
首先,运行grunt build --env uat
,然后运行成功。
之后,运行grunt watch --evn uat
,但在Running "watch_default" task
步骤中,显示等待,但不会进入下一步。
我试图在谷歌搜索,但仍然没有一个很好的解决方案来解决这个问题。
这是参考:
1。[Watch] Waiting... never OK #474
2。Grunt watch Running “watch” task Waiting
3。Trying to run a Grunt watch task but it just says Waiting... and never resolves?
更新:
## Custom tasks ------------------------------------------------------------
grunt.task.renameTask "watch", "watch_default"
grunt.registerTask "default", "Usage", usage
grunt.registerTask "scripts", "Compiles the JavaScript files.", [
"clean:scripts"
"coffee:all"
"coffee:env"
"browserify:all"
"clean:temp"
].concat unless Debug then ["uglify:all"] else []
grunt.registerTask "stylesheets", "Compiles the stylesheets.", [
"clean:stylesheets"
"stylus:all"
"autoprefixer:all"
].concat unless Debug then ["cssmin"] else []
grunt.registerTask "test", "Run unit testing.", ->
grunt.fail.fatal "Unit testing is not implemented yet" # TODO
grunt.registerTask "build", "Compiles all of the assets and copies the files to the Build directory.", [
"clean:all"
"copy:static"
"jade:all"
"htmlmin:all"
"stylesheets"
"scripts"
].concat unless Debug then ["clean:production"] else []
grunt.registerTask "watch", "Builds and watches the project for changes.", [
"build"
"watch_default"
]