K
K
Kizzeon2019-09-08 13:00:52
css
Kizzeon, 2019-09-08 13:00:52

Is it possible to install css plugins and use them without manually editing the gulpfile?

Hello, I recently wanted to install PostCSS in my project, as it adds a lot of necessary features, and generally saves time.
However, as many as 20 plugins each time manually enter into gulpfile.js a little dreary.
I went to the site, installed the package, found how to insert it into gulpfile.js and add each one separately.
Questions: Is it necessary to edit the gulpfile after installing the plugin via npm in the project?
Are there ready-made PostCSS projects with pre-installed plugins?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2019-09-08
@sfi0zy

However, as many as 20 plugins each time manually enter

So you do not need to re-do the configs every time. It's more productive to make them once and then use them in all projects (maybe with minimal changes). This, in addition to saving time, will give a bonus in the form of an intuitive understanding of what transformations there are in a particular project. If you make a new set with your hands every time, then it's easy to confuse yourself and then waste time on "like it worked yesterday, but today it doesn't" when some plugins are lost. Also do not forget that you can store PostCSS settings not in Gulpfile, but in a separate file - this can be convenient ( as an example ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question