/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.100.2
test/helpers/findOutputFiles.js
18 строк
480 B
Ivan Kopeykin
fix asset module hash
29 ноя 2021, 19:37
29 ноя 2021, 19:37
8d8e2e3
Код
Авторство
О чём код?
"use strict"; const fs = require("fs"); const path = require("path"); /** * @param {{output: {path: string}}} options options * @param {RegExp} regexp regexp * @param {string=} subpath path in output directory * @returns {string[]} files */ module.exports = function findOutputFiles(options, regexp, subpath) { const files = fs.readdirSync( subpath ? path.join(options.output.path, subpath) : options.output.path ); return files.filter(file => regexp.test(file)); };