html-minifier
html-minifier copied to clipboard
command line in IIS using Server.CreateObject("WScript.Shell") (in asp classic) not working
I am not sure what I am doing wrong...
function make_minify_version(file_name,input_dir,output_dir)
dim command, shell
command = "%comspec% /c html-minifier " & _
" --input-dir """ & input_dir & """ " & _
" --output-dir """ & output_dir & """ " &_
" -o """ & file_name & """"
Set shell = Server.CreateObject("WScript.Shell")
shell.exec command
set shell = nothing
end function
which should executes:
html-minifier --input-dir "D:\www\static_html\" --output-dir "D:\www\static_html\min\" -o test.html
Running the above in cmd I am getting the error:
You need to specify where to write the output files with the option --output-dir
Running
whitespace -V
I get
4.0.0
I would really like to save the file as test.html.min in the same folder instead of having it in a sub folder with the same name. Is that possible?
I got it working
Minifier_command = "npm exec --no -- html-minifier " & _
"""" & absoluteFileLocationAndName & """ " & _
" -o """ & absoluteFileLocationAndName & ".min"" " & _
" -c ""C:\Windows\System32\node_modules\html-minifier\html-cli-config-file.conf"""
the only problem I am having now is that I need to know when it is finished. How can a get a return?