tell me you're a js dev without telling me you're a js dev
Some checks failed
/ deploy (push) Failing after 19s
Some checks failed
/ deploy (push) Failing after 19s
This commit is contained in:
parent
056e040433
commit
b0bd91d089
1 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
from ftplib import FTP
|
||||
import requests
|
||||
import minify_html
|
||||
from os import listdir, getenv
|
||||
from os import listdir, getenv, chdir
|
||||
from io import BytesIO
|
||||
|
||||
# init ftp
|
||||
|
@ -10,7 +10,9 @@ print(getenv('FTP_SERVER'))
|
|||
ftp = FTP(getenv('FTP_SERVER'))
|
||||
ftp.login(getenv('FTP_USER'), getenv('FTP_PASSWORD'))
|
||||
|
||||
for f in [i for i in listdir('html') if i.endswith('.html')]:
|
||||
chdir('html')
|
||||
|
||||
for f in [i for i in listdir() if i.endswith('.html')]:
|
||||
|
||||
# 1. Minify the index.html file using minify-html
|
||||
minified_content = minify_html.minify(open(f, 'r').read(), minify_css=True, minify_css_level_3=True, do_not_minify_doctype=True)
|
||||
|
|
Loading…
Reference in a new issue