Grunt 'grunt-bower-concat',忽略 mainFiles 选项

Grunt 'grunt-bower-concat', ignoring mainFiles option

很高兴认识!

在过去的几个小时里,我一直试图让 mainFiles 选项起作用,但它似乎忽略了我包含在其中的每个文件。我已经尝试了列表中的多个插件 - 但其中 none 成功了。诚然,我对 Grunt 相当陌生,但我一直在浏览 grunt-bower-concat 文档,但那里什么也没有。并且已经在实际插件代码中添加了一些控制台日志,显示没有文件被传递(当然之后恢复了文件)。

这是我正在使用的 GruntFile:

  module.exports = function(grunt) {

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    bower_concat: {
      main: {
        dest: 'Assets/Build/Scripts/plugins.js',
        cssDest: 'Assets/Build/Styles/plugins.css',
        dependencies: {
          'amplify': 'jquery'
        },
        mainFiles: {
          bootstrap: ['bower_components/bootstrap/dist/css/bootstrap.css']
        },
        exclude: [
          'leaflet-illustrate'
        ]
      }
    }
  });

  grunt.loadNpmTasks('grunt-bower-concat');

  grunt.registerTask('buildbower', ['bower_concat']);

};

Leaflet-Illustrate 已被排除(目前),因为它对实际任务造成严重破坏,而且没有 mainFiles 选项,我无法正确包含它。

有没有人可以指导我正确的方法,或者纠正我? 提前致谢!

事实证明,我输入了不需要的完整路径。意思是,这部分有效:

  main: {
    mainFiles: {
      'bootstrap': ['dist/css/bootstrap.css']
    }