Twitter bootstrap 为什么编译Bootstrap3RC1时会给Grunt/Recurse一个错误,而Lessc不会?
我向mixins.less添加了一些代码:Twitter bootstrap 为什么编译Bootstrap3RC1时会给Grunt/Recurse一个错误,而Lessc不会?,twitter-bootstrap,less,gruntjs,twitter-recess,Twitter Bootstrap,Less,Gruntjs,Twitter Recess,我向mixins.less添加了一些代码: img { &:extend(.img-responsive); } 另见:和 当我从命令行运行grunt dist时,我得到: Running "recess:bootstrap" (recess) task >> Parser error in less/mixins.less >> 549. img { >> 550. &:extend(.img-responsi
img { &:extend(.img-responsive); }
另见:和
当我从命令行运行grunt dist
时,我得到:
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
我没有发现错误。(lessc 1.4.2(更少的编译器)[JavaScript]
)
&:extend
所需的资源少于1.4.0。那么grunt/session是否使用不同的编译器
更新
运行install grunt contrib less--save dev
提供:
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版本会更少,但仍然会出现此错误,这取决于
grunt contrib less
的版本
运行:
谢谢你的回复。我试过了,但还是得到了同样的错误,你的Grunfile仍然在引用如何编译less。这也需要更新,否则它仍将使用休会来编译。和你现在的版本一样。你成功了吗?对不起,我不知道。我运行Bootstrap3.1.1。现在。我仅在3.0 RC1中发现此问题
npm update grunt-contrib-less