My Angular2 project having 100+ Css files, those files does't have any prefixer like for :Mozila, :Chrome etc, i want some tool or any gulp task or anything which will convert my all css files into files having prefixers.
I have tried this
but not working as per my use case,
so is it possible ? if yes how ?
Since you asked for an answer :
In your IDE (I take Visual Studio Code as an example):
.*
)Enter your regex. It goes like this
^\s*([a-z-]*)\s*:\s*([\d\w-()"\s\.:=!@]*);?\s*$
In the second field, use something like
moz-$1: $2;\nsafari-$1: $2;
It will add "moz-" to every property found by the regex.
Of course I typed it fast, so you will have to make some adjustements, but the idea is here.
EDIT AFTER CHAT Here is the explanation :
To answer how it's possible : when you put parenthesis in a regex, it "captures" what it finds and register it in a variable starting with a $ sign. That's why you write $1, $2 in the replace string, because it captured the property name, and the property value. The \n allows a line return, and all you have to do is put as many prefixes as you want like that !