SASS与Ember CLI插件 [英] SASS with Ember CLI addons

查看:102
本文介绍了SASS与Ember CLI插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在Ember-CLI插件中使用SASS?



我在 / app /样式文件夹,但我不知道这是否是正确的位置。我在我的插件项目中安装了 broccoli-sass ,当我将文件夹包含在 / tests / dummy / app / styles / app.scss



@import'app / styles / app.scss';



但我不知道如何编译scss文件进入 / dist / assets / vendors。 css ,这是使用这个插件的项目加载的文件。

解决方案

解决方案



样式文件夹需要在 / addon / styles 而不是 /应用/样式,根文件应该称为addon.scss


I'd like to know how I can use SASS within an Ember-CLI addon?

I have my styles in /app/styles folder, but I'm not sure that's the right location to have them. I have broccoli-sass installed in my addon project, my Dummy test website compiles properly the scss files when I include my folder in /tests/dummy/app/styles/app.scss.

@import 'app/styles/app.scss';

But I don't know how I can compile the scss files to go into the /dist/assets/vendors.css, which is the file loaded by projects using this addon.

解决方案

OK I just found out the solution

The style folder needs to be in /addon/styles instead of /app/styles, and the root file should be called addon.scss

这篇关于SASS与Ember CLI插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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