下午好,尝试处理程序集,但得到错误:
“未定义不是函数”
我的文件夹结构:-/less style.less --/components header.less -/css -/img -/js
我安装了:grunt-contrib-less 和我的文件:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
options: {
paths: ["less"]
},
files: {
"css/style.css": "less/style.less"
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.registerTasks('default',['less']);
};
在 style.less 我写道:@import "components/page-header.less";
告诉我我的错误是什么?