css - 如何使用 Yeoman 的 Grunt.js 文件启用 SASS lineNumbers?

标签 css sass gruntjs yeoman-generator line-numbers

我最近使用 Yeoman (1.4.5) 构建了一个新的网络应用程序。在我的 Gruntfile.js 中,我设置了以下配置:

...

// Compiles Sass to CSS and generates necessary files if requested
sass: {
  options: {
    lineNumbers:true,
    sourceMap: true,
    includePaths: ['bower_components']
  }
...

即使 Grunt (grunt-cli v0.1.13) 无误地处理我的指令并且一切运行顺利,不幸的是我编译的 CSS 文件中没有显示 SASS 行号? 我是不是遗漏了什么或者这是 grunt-sass 节点包的问题?我想将我的自动化任务指令集中在我的 gruntfile.js 中。任何帮助将不胜感激!

最佳答案

正确的选项是:

sourceComments: true

关于css - 如何使用 Yeoman 的 Grunt.js 文件启用 SASS lineNumbers?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28591755/

相关文章:

html - 使用 CSS 重复垂直线

css - SCSS : How to place an On-Screen-Keyboard on bottom of screen?

node.js - npm 安装不起作用

php - 帮我找个轻便的 php/html/js IDE

html - Flexbox 水平拉伸(stretch)图像

html - 让 <p> 表现得像 <br>

css - Symfony Webpack - 使用子目录中的自定义字体

node.js - 如何使用 grunt 连接 angularjs 文件

javascript - 配置 grunt 复制任务以排除文件/文件夹

ios - swift - Spritekit : Adding a counter (high score calculator) when node touches bottom edge