0

有人可以帮助我并告诉我我在这里做错了什么。我有以下 grunt 任务,我想将 css 文件从构建目录移动到项目的根目录。

module.exports = {
    copy: {
        main: {
            files: [{
                expand: true,
                cwd: "build/css/",
                src: "style.css",
                dest: "../"
            }]
        },
    },
}

当我运行grunt copy -v这就是说:

$ grunt copy -v
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Running tasks: copy

Running "copy" task

Running "copy:copy" (copy) task
Verifying property copy.copy exists in config...OK
File: [no files]
Options: encoding="utf8", processContent=false, processContentExclude=[], timestamp=false, mode=false


Done, without errors.
4

1 回答 1

0

别担心,解决了。这个晚上太晚了...... :(

该任务正在运行因此删除的文件名copy,现在它可以工作了。

module.exports = {
    main: {
        files: [{
            expand: true,
            cwd: "build/css/",
            src: "style.css",
            dest: "../"
        }]
    },
}
于 2016-04-03T22:03:59.333 回答