1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-02 12:00:03 +02:00

remove streamToString

This commit is contained in:
s2
2019-04-15 10:39:58 +02:00
parent 86e1333c3e
commit d1fd48f7e1

View File

@@ -25,16 +25,6 @@ if (!argv.js || !argv.css) {
return;
}
function streamToString(stream) {
const chunks = []
return new Promise((resolve, reject) => {
stream.on('data', chunk => chunks.push(chunk))
stream.on('error', reject)
stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')))
})
}
var excludeFiles = argv.exclude || [];
if (typeof(excludeFiles) === 'string') {
excludeFiles = [excludeFiles];