[英]How to combine file and not minify them using grunt
我有以下grunt文件:
module.exports = function(grunt) {
grunt.initConfig({
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'css/output.css': ['css/one.css', 'css/two.css']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['cssmin']);
};
今天才刚开始使用grunt.js,只是看了看文档和示例,我正在使用以下插件:
现在,我的文件被最小化为一个,但是我真正想要的是将它们仅合并为一个,而不是最小化。 我该如何实现?
您应该使用grunt-contrib-concat插件执行此任务。 仔细查看GitHub文档,了解如何配置任务(例如,分隔符,横幅等)
grunt.initConfig({
concat: {
dist: {
src: ['css/one.css', 'css/two.css'],
dest: 'css/output.css',
},
},
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.