Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Grunt contrib咖啡不';t写入输出文件(无提示地失败而不引发错误)_Node.js_File Io_Coffeescript_Gruntjs - Fatal编程技术网

Node.js Grunt contrib咖啡不';t写入输出文件(无提示地失败而不引发错误)

Node.js Grunt contrib咖啡不';t写入输出文件(无提示地失败而不引发错误),node.js,file-io,coffeescript,gruntjs,Node.js,File Io,Coffeescript,Gruntjs,我在GruntV0.4.1中使用v.0.7.0 我已在Grunfile中声明了我的coffeescript任务。咖啡如下: coffee: dev: 'asd.js': 'asd.coffee' 在同一目录中,我有asd.coffee,其中包含 hello = 'hi' 以及空的asd.js 当我在终端中运行grunt coffee时,它会打印: Running "coffee:dev" (coffee) task Done, without errors. 但是没有任何东西

我在GruntV0.4.1中使用v.0.7.0

我已在Grunfile中声明了我的coffeescript任务。咖啡如下:

coffee:
  dev:
    'asd.js': 'asd.coffee'
在同一目录中,我有asd.coffee,其中包含

hello = 'hi'
以及空的asd.js

当我在终端中运行
grunt coffee
时,它会打印:

Running "coffee:dev" (coffee) task

Done, without errors.
但是没有任何东西被写入asd.js(或任何地方)。怎么了?如何修复此问题?

将其更改为:

coffee:
  dev:
    files:
      'asd.js': 'asd.coffee'
将其更改为:

coffee:
  dev:
    files:
      'asd.js': 'asd.coffee'

此外,为了验证GruntJs实际上在做什么,您可以尝试:

grunt coffee --verbose

并查看它正在处理哪些文件(如果有的话)

,以验证GruntJs实际上在做什么,而不是您总是可以尝试的:

grunt coffee --verbose

并查看它正在处理哪些文件(如果有)

好提示。这本可以帮我节省几个小时的(好提示。这本可以帮我节省几个小时的。)(