Answer the question
In order to leave comments, you need to log in
How to programmatically change a large number of css classes (preferably using Gulp)?
There was a task to add the same prefix to all css classes and IDs, for example, dd_
Project on Gulp, CSS is compiled from SASS, the Bulma framework is also connected to the project (it's like Bootstrap, if that). Not the entire Bulma file is used - and unused styles are removed through gulp-uncss. The output after assembly needs to be assigned these prefixes - including the framework classes.
Pug is also used - accordingly, all these prefixes should also appear in the final html. Fortunately, there are practically no scripts - you can rewrite them with your hands.
Is there some plugin or algorithm for Gulp to do this? If not, is there at least some source search/replace mechanism in Atom, Sublime, or Notepad?
Answer the question
In order to leave comments, you need to log in
found this.
https://www.npmjs.com/package/gulp-class-prefix
https://www.npmjs.com/package/gulp-html-prefix
The question is how best to do it.Looking for what is better.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question