SASS与Ember CLI插件 [英] SASS with Ember CLI addons
问题描述
我在 / 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屋!