F
F
flafy42019-10-27 16:52:44
JavaScript
flafy4, 2019-10-27 16:52:44

How to get file content like css in gulp.src?

How to get the contents of *.css files? For example write the contents of each file into an array?

function build() {
    return gulp.src('./src/css/*.css')
            ....
    /* Тут функция обработчик которая получает эти файлы */
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2019-10-27
@flafy4

There is such a thing as gulp-tap , which can be used to solve your problem.
But in general - the contents of files can be obtained regardless of collectors and task runners using fs.readFile or fs.readFileSync ( example ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question