Z
Z
zhdoon2019-05-16 12:30:37
JavaScript
zhdoon, 2019-05-16 12:30:37

How can I configure Gulp to minify files in a large number of folders and save them in the same folders, but with a .min suffix?

There is a file structure like this:
/src/
/src/temp/
/src/temp/folderA/
/src/temp/folderB/
/src/temp/folderA/subfolder/
...
Any folder/subfolder can contain css files, js.
How to configure Gulp (v4) so ​​that:
1. By default, the collector bypasses all folders and minifies all css, js files it encounters, minifies and saves in the same folders, but with the .min suffix
2. How to configure Watchers to they also listened to all folders and in case of change css, js minified and saved their minified versions with .min suffix.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tyzberd, 2019-05-16
@tyzberd

to bypass folders you need to write
/src/**/*.scss

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question