usemin 配置问题
<!-- build:css(.tmp) ../styles/main.css -->
<link rel="stylesheet" href="../../styles/main.css">
<!-- endbuild --> dist 不能生成样式表 JS文件也是空的 grunt -uesmin 的问题吗应该怎么改呢
<!-- build:css(.tmp) ../styles/main.css -->
<link rel="stylesheet" href="../../styles/main.css">
<!-- endbuild --> dist 不能生成样式表 JS文件也是空的 grunt -uesmin 的问题吗应该怎么改呢
2015-01-15
useminPrepare: { options: { dest: '<%= config.dist %>' }, html: [ '<%= config.dist %>/**/*.html', '!<%= config.dist %>/include/**/*.html' ] }, // Performs rewrites based on rev and the useminPrepare configuration usemin: { options: { assetsDirs: [ '<%= config.dist %>', '<%= config.dist %>/images', '<%= config.dist %>/styles' ] }, html: ['<%= config.dist %>/**/*.html'], css: ['<%= config.dist %>/styles/**/*.css'] }, 不知道还有没有更好的办法
解决的办法找到了
concat 设置问题进行合并
concat: {
concatcss: {
files: [{
src: [
'.tmp/styles/main.css'
],
dest: '<%= config.dist %>/styles/main.css'
}]
},
concatjs: {
files: [{
src: [
'<%= config.app %>/scripts/main.js'
],
dest: '<%= config.dist %>/scripts/main.js'
}]
},
modernizr: {
files: [{
src: [
'bower_components/modernizr/modernizr.js'
],
dest: '<%= config.dist %>/scripts/vendor/modernizr.js'
}]
},
vendorjs: {
files: [{
src: [
'bower_components/**/*.js',
'!bower_components/modernizr/modernizr.js'
],
dest: '<%= config.dist %>/scripts/vendor.js'
}]
}
},
举报