Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set up Stylus in Angular2 CLI project?

I'd like to use Stylus instead of standard CSS in my Angular2 CLI project. I've had a look around and can't find any solid sources on how to set this up.

like image 427
sparcut Avatar asked May 10 '17 07:05

sparcut


1 Answers

When you start the project with Angular-cli run:

ng new my-app --style styl

Angular 6+ To change pre-processor on existing project run:

ng config schematics.@schematics/angular:component.styleext styl

BELOW Angular 6 To change pre-processor on existing project run:

ng set defaults.styleExt styl
like image 61
Meek Avatar answered Oct 18 '22 21:10

Meek