我试图用咕噜手表编译减档,我有一个包含较少的文件和2个的目标文件夹2个文件夹,但它让我看到了一个错误:使用grunt watch将多个文件夹从LESS复制到CSS?
object has no method 'indexOf;
gruntfile.js代码:
module.exports = function(grunt) {
grunt.initConfig({
less: {
options: {
paths: ["./less"],
yuicompress: true
},
files: [{
expand: true,
cwd: './less',
src: ['*.less', '!{fonts, variable, mixins}*.less'],
dest: './css',
ext: '.css'
}, {
expand: true,
cwd: './less',
src: '*.less/themes',
dest: './css/themes',
ext: '.css'
}],
},
watch: {
files: "./less/*",
tasks: ["less"]
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['watch']);
};
你可以看到;文件:'选项是包含2个不同的文件夹。