【问题标题】:Grunt-contrib-copy task is failing when cwd option is specified指定 cwd 选项时,Grunt-contrib-copy 任务失败
【发布时间】:2013-10-31 23:26:12
【问题描述】:

我有这个 grunt-copy 设置:

copy: {
        images: {
            cwd: 'src/multiselect/lib/',
            src: 'chosen.css',
            dest: './built/css/',
            flatten: true,
            filter: 'isFile'
        }
    },

当我运行它时,它总是运行:

Running "copy:images" (copy) task
Warning: Unable to read "chosen.css" file (Error code: ENOENT). Use --force to continue.
Aborted due to warnings.

奇怪的是,如果我用这个配置运行它:

copy: {
        images: {
            src: 'src/multiselect/lib/chosen.css',
    //      src: 'chosen.css',
            dest: './built/css/',
            flatten: true,
            filter: 'isFile'
        }
    },

它每次都有效。有人知道为什么吗?这行代码似乎发生了错误:

grunt.file.copy(src, dest, copyOptions); 

在 grunt-contrib-copy 任务中。任何帮助将不胜感激。

【问题讨论】:

    标签: gruntjs grunt-contrib-copy


    【解决方案1】:
    猜你喜欢
    • 2018-02-13
    • 2015-07-05
    • 1970-01-01
    • 2015-05-19
    • 1970-01-01
    • 2017-05-18
    • 2014-04-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多