带有 Ember CLI 插件的 SASS [英] SASS with Ember CLI addons

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

问题描述

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

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

我在 /app/styles 文件夹中有我的样式,但我不确定那是放置它们的正确位置.我的插件项目中安装了 broccoli-sass,当我在 /tests/dummy/app/styles/app.scss/tests/dummy/app/styles/app.scss.

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';

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

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

style文件夹需要在/addon/styles而不是/app/styles,根文件应该叫addon.scss

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

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

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