Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 咕噜';grunt bower concat';,忽略主文件选项_Javascript_Configuration_Gruntjs_Bower_Gruntfile - Fatal编程技术网

Javascript 咕噜';grunt bower concat';,忽略主文件选项

Javascript 咕噜';grunt bower concat';,忽略主文件选项,javascript,configuration,gruntjs,bower,gruntfile,Javascript,Configuration,Gruntjs,Bower,Gruntfile,认识得好 在过去的几个小时里,我一直试图让mainFiles选项工作,但它似乎忽略了我包含在其中的每个文件。我尝试了列表中的多个插件,但没有一个能够通过。不可否认,我对Grunt很陌生,但我一直在阅读Grunt bower concat文档,但没有任何内容。并且在实际的插件代码中添加了大量控制台日志,显示没有传递任何文件(当然,之后恢复了文件) 这是我正在使用的Grunfile文件: module.exports = function(grunt) { grunt.initConfig

认识得好

在过去的几个小时里,我一直试图让
mainFiles
选项工作,但它似乎忽略了我包含在其中的每个文件。我尝试了列表中的多个插件,但没有一个能够通过。不可否认,我对Grunt很陌生,但我一直在阅读
Grunt bower concat
文档,但没有任何内容。并且在实际的插件代码中添加了大量控制台日志,显示没有传递任何文件(当然,之后恢复了文件)

这是我正在使用的Grunfile文件:

  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']);

};
传单插图已被排除(目前),因为它对实际任务造成了严重破坏,并且没有
mainFiles
选项,我无法正确地包含它

有没有人能以正确的方式指导我,或者纠正我?
提前谢谢

结果是,我输入了一条不需要的完整路径。意思是,这部分工作:

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

你有没有试着在我做的
'bootstrap'
周围加上引号,可惜没有帮助:)而且你不必在bootstrap:-)周围加引号