【问题标题】:How to enable grunt reload after less compilation?较少编译后如何启用 grunt reload?
【发布时间】:2013-11-04 20:47:51
【问题描述】:

我创建了一个 grunt 项目,安装了 bootstrap 和 grunt-contrib-less 并将 grunt 配置为

  • 监听较少的文件更改并适当地运行“较少”任务(工作)
  • 在“少”任务(工作)上编译 Bootstrap.less
  • 编译较少时重新加载浏览器(不工作)

Here is my gruntfile。有什么问题吗?

对于告诉我为什么在 grunt-recess 中替换 grunt-contrib-less(如在任务中将 'less' 替换为 'recess')有效但因大量编译错误而中止的人来说,这也是加分。 谁能告诉我为什么当 Twitter 只支持带休止符编译 bootstrap 时编译工作量会减少。

谢谢

【问题讨论】:

    标签: less gruntjs twitter-bootstrap-3


    【解决方案1】:

    gruntfile 似乎没问题。假设“watch”任务正在运行,浏览器的 livereload 只能在安装插件的情况下发生。有关SafariChromeFirefox 扩展名,请参阅http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-

    对于您的编译错误,请注意Grunt-contrib-less 使用的是less v1.5,而recess 仍使用less v1.3。 见this issue on github

    这意味着,例如,用recess 编译你不能use the SourceMap feature

    【讨论】:

      猜你喜欢
      • 2015-05-28
      • 1970-01-01
      • 1970-01-01
      • 2013-05-09
      • 1970-01-01
      • 1970-01-01
      • 2023-04-11
      • 2016-03-09
      • 2019-04-26
      相关资源
      最近更新 更多