move minify-quotes to minify
This commit is contained in:
parent
f8b5e04423
commit
251e70e869
4 changed files with 5 additions and 8 deletions
|
|
@ -215,8 +215,8 @@ int main(int argc, char* argv[])
|
||||||
if(options['J'])
|
if(options['J'])
|
||||||
{
|
{
|
||||||
std::cout << gen_json_struc(sh) << std::endl;
|
std::cout << gen_json_struc(sh) << std::endl;
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(options['o']) // file output
|
if(options['o']) // file output
|
||||||
|
|
@ -259,8 +259,6 @@ int main(int argc, char* argv[])
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
return ERR_RUNTIME;
|
return ERR_RUNTIME;
|
||||||
}
|
}
|
||||||
end:
|
|
||||||
|
|
||||||
delete sh;
|
delete sh;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -500,4 +500,5 @@ void minify_generic(_obj* in)
|
||||||
{
|
{
|
||||||
recurse(r_minify_empty_manip, in);
|
recurse(r_minify_empty_manip, in);
|
||||||
recurse(r_minify_single_block, in);
|
recurse(r_minify_single_block, in);
|
||||||
|
minify_quotes(in);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,7 @@ ztd::option_set options( {
|
||||||
#endif
|
#endif
|
||||||
ztd::option("\r [Processing]"),
|
ztd::option("\r [Processing]"),
|
||||||
ztd::option('m', "minify", false, "Minify code without changing functionality"),
|
ztd::option('m', "minify", false, "Minify code without changing functionality"),
|
||||||
ztd::option('M', "minify-full", false, "Enable all minifying features: -m --minify-quotes --minify-var --minify-fct --remove-unused"),
|
ztd::option('M', "minify-full", false, "Enable all minifying features: -m --minify-var --minify-fct --remove-unused"),
|
||||||
ztd::option("minify-quotes", false, "Remove unnecessary quotes"),
|
|
||||||
ztd::option('C', "no-cd", false, "Don't cd when doing %include and %resolve"),
|
ztd::option('C', "no-cd", false, "Don't cd when doing %include and %resolve"),
|
||||||
ztd::option('I', "no-include", false, "Don't resolve %include commands"),
|
ztd::option('I', "no-include", false, "Don't resolve %include commands"),
|
||||||
ztd::option('R', "no-resolve", false, "Don't resolve %resolve commands"),
|
ztd::option('R', "no-resolve", false, "Don't resolve %resolve commands"),
|
||||||
|
|
@ -72,7 +71,6 @@ void get_opts()
|
||||||
options['m'].activated=true;
|
options['m'].activated=true;
|
||||||
options["minify-var"].activated=true;
|
options["minify-var"].activated=true;
|
||||||
options["minify-fct"].activated=true;
|
options["minify-fct"].activated=true;
|
||||||
options["minify-quotes"].activated=true;
|
|
||||||
options["remove-unused"].activated=true;
|
options["remove-unused"].activated=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -511,8 +511,8 @@ bool r_do_string_processor(_obj* in)
|
||||||
require_rescan_all();
|
require_rescan_all();
|
||||||
if(options["remove-unused"])
|
if(options["remove-unused"])
|
||||||
delete_unused( tsh, re_var_exclude, re_fct_exclude );
|
delete_unused( tsh, re_var_exclude, re_fct_exclude );
|
||||||
if(options["minify-quotes"])
|
if(options["minify"])
|
||||||
minify_quotes(tsh);
|
minify_generic(tsh);
|
||||||
if(options["minify-var"])
|
if(options["minify-var"])
|
||||||
minify_var( tsh, re_var_exclude );
|
minify_var( tsh, re_var_exclude );
|
||||||
if(options["minify-fct"])
|
if(options["minify-fct"])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue