简体   繁体   English

Angular2-流星和物化-scss

[英]Angular2-Meteor and materialize-scss

I've started playing with urigo/angular2-meteor-base , followed the official tutorial and now want to test a frontend css framework. 我已经开始使用urigo / angular2-meteor-base ,遵循官方教程,现在想测试前端CSS框架。 After some googling I chose poetic:materialize-scss but I'm having some issue importing the scss file. 经过一番谷歌搜索后,我选择了poetic:materialize-scss,但是在导入scss文件时遇到了问题。

Installation from the official docs: 从官方文档安装:

meteor add fourseven:scss
meteor add poetic:materialize-scss

Then import the scss in client/styles/main.scss: 然后将scss导入client / styles / main.scss中:

@import "{poetic:materialize-scss}/sass/materialize.scss";

After running meteor in the project folder and I get the following error: 在项目文件夹中运行meteor ,出现以下错误:

Errors prevented startup:

While determining active plugins:
error: conflict: two packages included in the app (fourseven:scss and angular2-compilers) are both trying to handle *.scss
error: conflict: two packages included in the app (fourseven:scss and angular2-compilers) are both trying to handle *.sass

So I've tried removing fourseven:scss and running meteor again: 因此,我尝试删除fourseven:scss并再次运行meteor

Errors prevented startup:

While processing files with angular2-compilers (for target web.browser):
/client/styles/main.scss: Scss compiler error: 
File to import {poetic:materialize-scss}/sass/materialize.scss not found in file: 
/home/vagrant/Projects/NgMeteor/{}/client/styles/main.scss

This is a list of packages installed: 这是已安装的软件包的列表:

angular2-compilers         0.6.6
autopublish                1.0.7
dispatch:mocha-phantomjs   0.1.9
es5-shim                   4.6.15
hwillson:stub-collections  1.0.3
insecure                   1.0.7
meteor-base                1.0.4
mobile-experience          1.0.4
mongo                      1.1.14
poetic:materialize-scss    1.97.6_1 
practicalmeteor:mocha      2.4.5_6 
reactive-var               1.0.11
shell-server               0.2.1
standard-minifier-css      1.3.2
standard-minifier-js       1.2.1
tracker                    1.1.1 
xolvio:cleaner             0.3.1

Not sure if I'm importing the scss file from the right location... does anyone having the same issue? 不知道我是否从正确的位置导入scss文件...有人遇到同样的问题吗?

I am not sure how to include a meteor package scss but I do know how to include a npm package so as a solution you could just install it via npm npm install materialize-css and then include it. 我不确定如何包含流星软件包scss,但我确实知道如何包含npm软件包,因此,作为解决方案,您可以通过npm安装npm install materialize-css,然后包括它。 Seems to be located here https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss so you should be able to do @import "{}/node_modules/materialize/sass/materialize.scss"; 似乎位于这里https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss,因此您应该能够@import“ {} /node_modules/materialize/sass/materialize.scss”; Also, do you know about https://github.com/angular/material2 ? 另外,您是否了解https://github.com/angular/material2 I'd recommend using that instead. 我建议改用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM