Ignore a missing mediacompress since its a local package.
[ci skip]
This commit is contained in:
parent
7afb05ae93
commit
a26fcfa4b6
1 changed files with 14 additions and 4 deletions
|
@ -1,17 +1,27 @@
|
||||||
# -*- coding: iso-8859-1 -*-
|
# -*- coding: iso-8859-1 -*-
|
||||||
|
# Hook routines for the wok static site generator.
|
||||||
|
# Note that mediacompress is a local module.
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def compress_javascript(config, output_path):
|
def compress_javascript(config, output_path):
|
||||||
"""Minify JS files."""
|
"""Minify JS files."""
|
||||||
from mediacompress import compress_js_files
|
try:
|
||||||
compress_js_files(output_path, excludes=("*.min.js",))
|
from mediacompress import compress_js_files
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
compress_js_files(output_path, excludes=("*.min.js",))
|
||||||
|
|
||||||
|
|
||||||
def compress_css(config, output_path):
|
def compress_css(config, output_path):
|
||||||
"""Minify CSS files."""
|
"""Minify CSS files."""
|
||||||
from mediacompress import compress_css_files
|
try:
|
||||||
compress_css_files(output_path)
|
from mediacompress import compress_css_files
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
compress_css_files(output_path)
|
||||||
|
|
||||||
|
|
||||||
def chmod(config):
|
def chmod(config):
|
||||||
|
|
Loading…
Reference in a new issue