【发布时间】:2016-01-01 23:55:17
【问题描述】:
认识!
在过去的几个小时里,我一直试图让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 选项,我无法正确包含它。
有没有人可以以正确的方式指导我或纠正我? 提前致谢!
【问题讨论】:
-
你试过在
'bootstrap'周围加上引号 -
我做了,可悲的是没有帮助:)
标签: javascript configuration gruntjs bower gruntfile