創建工做空間css
ng new Test --style=scss //Angular6.x及如下能夠使用這個命令指定使用.scss樣式表ui
ng new Test //Angular7 以上版本不能使用上行命令指定scss,使用本行命令,會有css的格式選項進行選擇blog
創建組件工程scss
cd testtest
ng g library Testlib --prefix=enl //使用—prefix標誌是由於咱們但願庫組件是不一樣的。若是咱們不這樣作,Angular CLI將默認使用lib。angular
構建組件庫stl
ng build --prod Testlib //從6.1版開始,Angular老是構建咱們的庫。若是您仍然使用6.0版本。在構建庫時,須要使用—prod標誌。樣式
能夠參考https://blog.angularindepth.com/creating-a-library-in-angular-6-87799552e7e5這篇文章co