Javascript Grunt usemin找不到目标
我遵循了以下教程: 并且一直没有找到“有用”的目标 Grunfile.js: 源文件: /script/app/index.html /script/app/js/file2.js 该过程失败,结果index.html不包含指向缩小js文件的链接Javascript Grunt usemin找不到目标,javascript,gruntjs,yeoman,grunt-usemin,gruntfile,Javascript,Gruntjs,Yeoman,Grunt Usemin,Gruntfile,我遵循了以下教程: 并且一直没有找到“有用”的目标 Grunfile.js: 源文件: /script/app/index.html /script/app/js/file2.js 该过程失败,结果index.html不包含指向缩小js文件的链接 谢谢您输入了一个错误,它是usemin:而不是usermin:问题出现在usemin路径中。。在详细模式下工作时,我能够理解它。以下是我的最终输出: module.exports = function(grunt) { grunt.init
谢谢您输入了一个错误,它是
usemin:
而不是usermin:
问题出现在usemin路径中。。在详细模式下工作时,我能够理解它。以下是我的最终输出:
module.exports = function(grunt) {
grunt.initConfig({
useminPrepare:{
html: 'index.html',
options:{
dest:'build'
}
},
usemin: {
html: 'build/index.html'
},
copy :{
task1: {expand: true, src: ['Partials/**', 'Nav/**', 'Resources/Images/**', 'Resources/packages/**', 'Resources/invoices/**',
'config.js', 'index.html', 'favicon.ico'], dest:'build/'},
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-usemin');
grunt.registerTask('default',[
'copy:task1',
'useminPrepare',
'concat',
'uglify',
'cssmin',
'usemin'
]);
};