![](/img/trans.png)
[英]How to inject an external .less file in bootstrap.less using Grunt.js
[英]bootstrap less grunt not working
我似乎無法讓我的gruntfile從bootstrap編譯我較少的文件,這是我的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文件,我不認為這會引起某種沖突嗎? 我已經三遍檢查了我的路徑,它們很好。
編輯:我的文件夾結構:
謝謝
我的脾氣暴躁的少配置有塊的開發和生產目標。 這樣行嗎?
module.exports = function(grunt) {
// Configuration goes here
grunt.initConfig({
less: {
development: {
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
};
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.