Angular2-Meteor 和 materialize-scss
Angular2-Meteor and materialize-scss
我已经开始玩 urigo/angular2-meteor-base, followed the official tutorial and now want to test a frontend css framework. After some googling I chose poetic:materialize-scss 但我在导入 scss 文件时遇到了一些问题。
从官方文档安装:
meteor add fourseven:scss
meteor add poetic:materialize-scss
然后在client/styles/main.scss中导入scss:
@import "{poetic:materialize-scss}/sass/materialize.scss";
在项目文件夹中 运行 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
所以我再次尝试删除 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
这是已安装的软件包列表:
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
不确定我是否从正确的位置导入 scss 文件...有人遇到同样的问题吗?
我不确定如何包含 meteor 包 scss 但我知道如何包含 npm 包作为解决方案,您可以通过 npm npm install materialize-css 然后包含它。似乎位于此处 https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss 所以你应该可以做到
@import "{}/node_modules/materialize/sass/materialize.scss";
另外,你知道 https://github.com/angular/material2 吗?我建议改用它。
我已经开始玩 urigo/angular2-meteor-base, followed the official tutorial and now want to test a frontend css framework. After some googling I chose poetic:materialize-scss 但我在导入 scss 文件时遇到了一些问题。
从官方文档安装:
meteor add fourseven:scss
meteor add poetic:materialize-scss
然后在client/styles/main.scss中导入scss:
@import "{poetic:materialize-scss}/sass/materialize.scss";
在项目文件夹中 运行 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
所以我再次尝试删除 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
这是已安装的软件包列表:
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
不确定我是否从正确的位置导入 scss 文件...有人遇到同样的问题吗?
我不确定如何包含 meteor 包 scss 但我知道如何包含 npm 包作为解决方案,您可以通过 npm npm install materialize-css 然后包含它。似乎位于此处 https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss 所以你应该可以做到 @import "{}/node_modules/materialize/sass/materialize.scss"; 另外,你知道 https://github.com/angular/material2 吗?我建议改用它。