0

誰かが私を助けて、私がここで間違っていることを教えてください。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 に答える