首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在编译Bootstrap 3 RC1时给Grunt / compiling一个错误,而Lessc没有?

为什么在编译Bootstrap 3 RC1时给Grunt / compiling一个错误,而Lessc没有?
EN

Stack Overflow用户
提问于 2013-07-29 23:06:00
回答 1查看 1.5K关注 0票数 3

我向mixins.less添加了一些代码:

代码语言:javascript
复制
 img {   &:extend(.img-responsive); }

另见:Images not responsive by default in Twitter Bootstrap 3?https://stackoverflow.com/a/15573240/1596547

当我从命令行运行grunt dist时,我得到:

代码语言:javascript
复制
Running "recess:bootstrap" (recess) task
>> Parser error in less/mixins.less
>>      549. img {
>>      550.   &:extend(.img-responsive);
>>      551. }
Warning:  Use --force to continue.

Aborted due to warnings.

但是当我用Lessc:lessc bootstrap.less编译它时,我没有发现一个错误。(减编译器) JavaScript )

&:extend需要更少的1.4.0。所以格朗特/休庭使用不同的编译器?

update运行install grunt-contrib-less --save-dev提供:

代码语言:javascript
复制
grunt-contrib-less@0.7.0 node_modules/grunt-contrib-less
├── grunt-lib-contrib@0.6.1 (zlib-browserify@0.0.1)
└── less@1.4.2 (mime@1.2.11, mkdirp@0.3.5, ycssmin@1.0.1, request@2.27.0)

因此,我希望减少v1.4.2,但仍然会出现此错误。

EN

回答 1

Stack Overflow用户

发布于 2013-07-29 23:24:05

这取决于您拥有的grunt-contrib-less版本。

运行:

代码语言:javascript
复制
npm update grunt-contrib-less
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17935703

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档