【发布时间】:2020-02-21 02:13:26
【问题描述】:
我正在开发一个使用 Grunt 0.3 和 Coffee 的非常古老的项目,我需要将其更新为两者的较新版本,但我对 Grunt 并不是特别熟悉。以前,Grunt 会将 .js 文件编译到与源 .coffee 文件完全相同的文件夹和名称,我需要保持这种方式。但是,我在配置任务时遇到了麻烦。这就是我现在拥有的:
coffee: {
options: {
bare: true,
sourceMap: true,
expand: true,
flatten: false,
cwd: '.',
src: ['**/*.coffee'],
dest: '.',
ext: ".js"
}
}
这是我收到的消息:
C:\projetos\sesc-bertioga\bertioga-server\src\main\webapp (newGrunt -> origin) (sesc-bertioga@1.0.0)
λ grunt watch
Running "watch" task
Waiting...
>> File "public\javascript\app\views\solicitacao_grupo\tripulacao_view.coffee" changed.
>> No "coffee" targets found.
Warning: Task "coffee" failed. Use --force to continue.
我绝对无法更改输出位置,新文件必须与原始文件在同一目录下。你有什么想法吗?
【问题讨论】:
标签: coffeescript gruntjs grunt-contrib-watch grunt-contrib-coffee