Netbeans在保存SASS文件时是否生成单独的CSS文件? [英] Does Netbeans generate a separate CSS file when saving a SASS file?

查看:403
本文介绍了Netbeans在保存SASS文件时是否生成单独的CSS文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Netbeans 8.0来编辑我的HTML,PHP和CSS。只是今天我已经安装SASS并启用它在Netbeans。我在Ubuntu上开发,Ruby和Sass都在库中,所以我安装了它们,Netbeans发现SASS可执行文件,点击一个按钮。



我创建了一个名为 style.scss 的文件,测试颜色变量和一个虚拟 #test id。



我的理解是,当我保存 .scss 文件,它将被处理,并且具有相同名称的 .css 文件.css ,将被创建。



这不是真的吗?我没有看到其他SASS和 .css 文件生成问题在这里Stack Overflow,但我没有看到一个特定的Netbeans,所以我不知道是否有东西在我的环境中没有正确设置。此外,我不需要在保存时上传到服务器,我只是在本地测试和开发。



如何实际生成

解决方案 / div>

右键单击项目 - >属性 - > CSS预处理器



您必须设置输入文件夹,例如/ scss和输出文件夹像/ css



还有一个复选框保存时编译Sass文件。



- 样式契约可以是有用的。



这对我在NB7.4中工作,但在8,发生了什么...
插件页面说,它目前与8不兼容。



http: //plugins.netbeans.org/plugin/34929



更新:我的scss文件夹是错误的...所以它在NB8工作。
查看项目设置,并在两个文件夹中分隔.scss和.css文件,默认文件夹为/ scss,它将文件转换为/ css文件夹


I am using Netbeans 8.0 to edit my HTML, PHP, and CSS. Just today I have installed SASS and enabled it within Netbeans. I am developing on Ubuntu, and Ruby and Sass are both available in the repositories, so I installed them and Netbeans found the SASS executable with the click of a button. So, I assume it's all working.

I have created a file called style.scss, and put in some test colour variables and a dummy #test id.

My understanding was that when I saved the .scss file that it would get processed and a .css file with the same name, in this case style.css, would get created. Or updated if it already existed.

Is this not the case? I did see other SASS and .css file generation questions here on Stack Overflow, but I didn't see one specific to Netbeans, so I'm not sure if there's something I haven't set up correctly in my environment. Also, I don't need to upload to a server when saving, I am just testing and developing locally.

How do I actually generate a .css file from my .scss in Netbeans 8.0?

解决方案

Right click on the project -> Properties -> CSS Preprocessors

You have to set an input folder, for example /scss, and an output folder like /css

And there is a checkbox "Compile Sass files on save".

For Compiler options " --style compact " can be useful.

This was working for me in NB7.4, but in 8, something happened... The plugin page says, it's currently incompatible with 8.

http://plugins.netbeans.org/plugin/34929

UPDATE: My scss folder was wrong... So it's working in NB8. Look @ the project settings, and separate your .scss and .css files in two folder, the default folders are /scss and it converts files to /css folder

这篇关于Netbeans在保存SASS文件时是否生成单独的CSS文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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