A schematic to migrate from CSS to SCSS stylesheet format for an Angular CLI project
A schematic to migrate from CSS to SCSS (or vice versa) stylesheet format for an Angular CLI project
npm i --save-dev schematics-scss-migrate
Or using the CLI
ng add schematics-scss-migrate
Note that the ng add
command still adds the package to the devDependencies
In your Angular CLI project, run ng g schematics-scss-migrate:scss-migrate
.
This will do the following in the consuming project:
src
folder recursivelystyleUrls
in respective component classes to point to the new file names for stylesheetsangular.json
file or creates one if the schematic does not exist, andstyles.css
references to styles.scss
in the angular.json
file--dry-run=true
flagangular.json
file. It is case sensitive.