问题描述
在我写的index.html中:
<! - build:css(.tmp / styles)styles / styles.css - >
< link rel =stylesheethref =styles / style.sass/>
<! - endbuild - >
当我启动grunt服务器时
Sass文件被监视并编译成
.tmp / styles /
但是在我的dist / styles目录中,是写在我的xxxxxxx.styles.css中
可能我错过了什么吗?
运行 grunt server
时,Sass被编译为 .tmp / styles
,因为它只是暂时的。这样做的目的不是在你的 app
目录下创建一个编译好的CSS文件。当你运行 grunt
时,它会将它编译到 dist / styles
文件夹。
I try to use yeoman to compile a styles.sass file founded in app/styles directory.
In my index.html i write :
<!-- build:css(.tmp/styles) styles/styles.css -->
<link rel="stylesheet" href="styles/style.sass" />
<!-- endbuild -->
When i launch grunt server
Sass file is watched and compiled into
.tmp/styles/
But in my dist/styles directory, nothing is written in my xxxxxxx.styles.css
may i miss something?
Your Sass is compiled into .tmp/styles
when running grunt server
, since it's only temporary. This is done so not to create a mess of compiled CSS files in your app
directory. When you run grunt
it will compile it to the dist/styles
folder.
这篇关于我如何使用yeoman来处理Sass文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!