Compare commits
No commits in common. "89245f2553a41812f5de3e0579279b615d26cba4" and "a05ed4dfcd6c57fc7ecf653f69b4b8c88c1b1ff1" have entirely different histories.
89245f2553
...
a05ed4dfcd
@ -21,7 +21,7 @@ private func checkImageOptimAvailability() -> Bool {
|
|||||||
if version.count > 1 {
|
if version.count > 1 {
|
||||||
print(" ImageOptim: \(version.map { "\($0)" }.joined(separator: "."))")
|
print(" ImageOptim: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||||
} else {
|
} else {
|
||||||
print(" ImageOptim: Not found, download app from https://imageoptim.com/mac and install using 'npm install imageoptim-cli'")
|
print(" ImageOptim: Not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@ -36,7 +36,7 @@ private func checkMagickAvailability() -> Bool {
|
|||||||
let output = try safeShell("magick --version")
|
let output = try safeShell("magick --version")
|
||||||
guard let version = output.components(separatedBy: "ImageMagick ").dropFirst().first?
|
guard let version = output.components(separatedBy: "ImageMagick ").dropFirst().first?
|
||||||
.components(separatedBy: " ").first else {
|
.components(separatedBy: " ").first else {
|
||||||
print(" Magick: Not found, install using 'brew install imagemagick'")
|
print(" Magick: Not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
print(" Magick: \(version)")
|
print(" Magick: \(version)")
|
||||||
@ -54,7 +54,7 @@ private func checkCwebpAvailability() -> Bool {
|
|||||||
if version.count > 1 {
|
if version.count > 1 {
|
||||||
print(" cwebp: \(version.map { "\($0)" }.joined(separator: "."))")
|
print(" cwebp: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||||
} else {
|
} else {
|
||||||
print(" cwebp: Not found, download from https://developers.google.com/speed/webp/download")
|
print(" cwebp: Not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@ -71,7 +71,7 @@ private func checkAvifAvailability() -> Bool {
|
|||||||
if version.count > 1 {
|
if version.count > 1 {
|
||||||
print(" avif: \(version.map { "\($0)" }.joined(separator: "."))")
|
print(" avif: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||||
} else {
|
} else {
|
||||||
print(" avif: Not found, install using 'npm install avif'")
|
print(" avif: Not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@ -90,7 +90,7 @@ private func checkUglifyJsAvailability() -> Bool {
|
|||||||
print(" uglify-js: \(version.map { "\($0)" }.joined(separator: "."))")
|
print(" uglify-js: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||||
} else {
|
} else {
|
||||||
print("'\(output)'")
|
print("'\(output)'")
|
||||||
print(" uglify-js: Not found, install using 'npm install uglify-js'")
|
print(" uglify-js: Not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@ -108,7 +108,7 @@ private func checkCleanCssAvailability() -> Bool {
|
|||||||
if version.count > 1 {
|
if version.count > 1 {
|
||||||
print(" cleancss: \(version.map { "\($0)" }.joined(separator: "."))")
|
print(" cleancss: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||||
} else {
|
} else {
|
||||||
print(" cleancss: Not found, install using 'npm install clean-css-cli'")
|
print(" cleancss: Not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Install the required dependencies for CHGenerator
|
# Install the required dependencies for CHGenerator
|
||||||
|
|
||||||
# Install magick to resize images
|
|
||||||
brew install imagemagick
|
|
||||||
|
|
||||||
# Install avif to create AVIF versions of images
|
|
||||||
npm install avif -g
|
|
||||||
|
|
||||||
# Install the Javascript minifier (required if `minifyJavaScript = True`)
|
# Install the Javascript minifier (required if `minifyJavaScript = True`)
|
||||||
# https://github.com/mishoo/UglifyJS
|
# https://github.com/mishoo/UglifyJS
|
||||||
npm install uglify-js -g
|
npm install uglify-js -g
|
||||||
|
Loading…
Reference in New Issue
Block a user