我如何使用yeoman来处理Sass文件? [英] How i can use yeoman to work with Sass files?

查看:105
本文介绍了我如何使用yeoman来处理Sass文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我写的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文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆