【发布时间】:2014-02-02 15:14:55
【问题描述】:
我似乎无法让我的 gruntfile 从引导程序编译我的 less 文件,这是我的 gruntfile:
module.exports = function(grunt) {
// Configuration goes here
grunt.initConfig({
less: {
options: {
paths: ["public/bower_components/bootstrap/less"]
},
files: {
"public/css/bootstrap.css" : "public/bower_components/bootstrap/less/bootstrap.less"
}
}
});
// Load plugins here
grunt.loadNpmTasks("grunt-contrib");
grunt.loadNpmTasks("grunt-contrib-less");
// Define your tasks here
};
当我运行grunt less 时,我得到了
Running "less:files" (less) task
Done, without errors.
Bootstrap 有它自己的 grunt 文件,它的 bower 安装附带,我不认为它会导致某种冲突?我已经三次检查了我的路径,它们都很好。
编辑:我的文件夹结构:
谢谢
【问题讨论】:
-
您能发布您的文件夹结构以及保存 gruntfile 的位置吗?似乎您对文件的来源有一些问题。
-
嗨 Slawa,我已经发布了我的文件夹结构,gruntfile 在底部附近。
-
不是创建结果文件,还是部分创建文件等?
-
我不认为你需要 options.paths 这里。
-
@helion3 它根本没有创建它
标签: javascript twitter-bootstrap less gruntjs