【问题标题】:Grunt copy error - No "copy" targets foundGrunt 复制错误 - 找不到“复制”目标
【发布时间】:2013-10-10 01:43:19
【问题描述】:

我的 gruntfile.coffee 中有以下内容:

copy: {
        main: {
        expand: true,
        cwd: 'js/no-concat/',
        src: '**',
        dest: 'deploy/public_html/assets/javascripts/',
        flatten: true,
        filter: 'isFile',

        }
      }

当我从命令行运行“grunt copy”来测试它时,它说:

未找到“复制”目标。警告:任务“复制”失败。使用 --force 继续。

我在阳光下尝试了各种变化,但无济于事。

请帮忙:-/

【问题讨论】:

    标签: gruntjs


    【解决方案1】:

    以上内容不是有效的 Coffeescript。试试这个:

    module.exports = (grunt)->
      grunt.initConfig
    
        copy:
          main:
            expand: true
            cwd: 'js/no-concat/'
            src: '**'
            dest: 'deploy/public_html/assets/javascripts/'
            flatten: true
            filter: 'isFile'
    

    【讨论】:

    • 你知道,我发誓我尝试过这种语法风格。我想我一定有一个糟糕的压痕!谢谢本,真的很感激!!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-02-06
    • 1970-01-01
    • 2016-04-07
    • 2014-06-13
    • 2015-02-02
    • 2016-12-02
    • 2015-03-07
    相关资源
    最近更新 更多