概述
我喜歡新的角2 CLI使用與Susy,我能我的老前部結構遷移到它就好了。然而,我很難讓Susy(http://susy.oddbird.net/)加載。這是一個安裝好的寶石,可以作爲混合使用。如何角2 CLI
我認爲這可能是一個問題,我如何使用mixin,但我嘗試了一個自定義混合,它工作得很好。
所以我也做了以下內容:
安裝
安裝創業板:
gem install susy
NPM安裝: npm install susy sass-loader --save-dev
中的.src /款式進口超對稱。 scss
@import "~susy/sass/susy";
包括它的.src /應用/ app.component.scss
@include container;
當我運行ng serve
我得到以下錯誤:
ERROR in ./src/app/app.component.scss
Module build failed:
@include container;
^
No mixin named container
Backtrace:
stdin:2
in /Users/allie.munro/Desktop/angular-cli/src/app/app.component.scss (line 2, column 11)
@ ./src/app/app.component.ts 19:21-52
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
問題
任何人都可以看到我在An中安裝Susy所犯的錯誤或錯過gular2 CLI?文檔確實會說要修改我的webpack文件,但這不包含在ng new appname
提供的文件夾結構中。我相信我可以在node_modules文件夾中找到它,但這對我來說似乎不是最佳實踐。
查看項目自述文件的「第三方庫安裝」部分,看看是否可以幫助您:https://github.com/angular/angular-cli#3rd-party-library-安裝 –
謝謝,不幸的是這並沒有幫助。任何人都可以成功添加指南針,susy,斷點等任何混合。所有這些都不適合我。 – Bromox
好的,接下來我會嘗試去https://gitter.im/angular/home並在角度或角度室中提問 –