gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 10:11:23 25 4
gpt4 key购买 nike

很高兴认识!

在过去的几个小时里,我一直在尝试让 mainFiles 选项起作用,但它似乎忽略了我包含在其中的每个文件。我已经尝试了列表中的多个插件 - 但没有一个通过。诚然,我对 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']
}

关于javascript - Grunt 'grunt-bower-concat',忽略 mainFiles 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32946688/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com