mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
do not loop forever reading config file
This commit is contained in:
@@ -132,7 +132,7 @@ readStdin(function(html) {
|
|||||||
try {
|
try {
|
||||||
return JSON.parse(fs.readFileSync(configfilepath + '/.cleancssrc'));
|
return JSON.parse(fs.readFileSync(configfilepath + '/.cleancssrc'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (configfilepath != __dirname) {
|
if (configfilepath.length < 4) {
|
||||||
configfilepath = path.resolve(path.normalize(configfilepath + '/../'));
|
configfilepath = path.resolve(path.normalize(configfilepath + '/../'));
|
||||||
return readConfig(configfilepath);
|
return readConfig(configfilepath);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "minifyfromhtml",
|
"name": "minifyfromhtml",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "minify scripts and css starting from an html file",
|
"description": "minify scripts and css starting from an html file",
|
||||||
"main": "minifyfromhtml.js",
|
"main": "minifyfromhtml.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user