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

do not loop forever reading config file

This commit is contained in:
s2
2018-05-08 20:01:05 +02:00
parent 78e71967de
commit 040e1c6c4f
2 changed files with 2 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ readStdin(function(html) {
try {
return JSON.parse(fs.readFileSync(configfilepath + '/.cleancssrc'));
} catch (e) {
if (configfilepath != __dirname) {
if (configfilepath.length < 4) {
configfilepath = path.resolve(path.normalize(configfilepath + '/../'));
return readConfig(configfilepath);
} else {

View File

@@ -1,6 +1,6 @@
{
"name": "minifyfromhtml",
"version": "1.0.0",
"version": "1.0.1",
"description": "minify scripts and css starting from an html file",
"main": "minifyfromhtml.js",
"scripts": {