Convert LESS includes to SCSS.
Regex is PCRE. Adjust for your flavor as needed.
Now also handles includes in one-liners (e.g. a { .fancy-outline }
).
Search
(\{ *|^ +)\.([\w_-]+(?:[(;]| *\}))
Replace
\1@include \2
- For mixins that accept multiple comma-separated properties (such as
.boxShadow
), LESS requires an extra semicolon inside the parentheses (needed only when multiple properties are specified), which needs to be removed when moving to SCSS