Configure grunt copy task to exclude files/folders

后端 未结 5 1341
甜味超标
甜味超标 2020-12-01 09:04

I have installed the grunt task grunt-contrib-copy. I embedd it in my Gruntfile.js and load the task via grunt.loadNpmTasks(\'grunt-contrib-c

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 09:46

    I wanted to exclude all .gz files in my copy and this options did the job for all folders

    {
      expand: true,
      cwd:    './build/www/',
      src:    [ '**', '!**/*.gz' ],
      dest:   './mydDest'
    }
    

    So may be try !**/*.less, !gruntfile.js (no parens)

提交回复
热议问题