Compare commits
2 Commits
a05ed4dfcd
...
89245f2553
Author | SHA1 | Date | |
---|---|---|---|
|
89245f2553 | ||
|
6b32f37fd9 |
@ -21,7 +21,7 @@ private func checkImageOptimAvailability() -> Bool {
|
||||
if version.count > 1 {
|
||||
print(" ImageOptim: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||
} else {
|
||||
print(" ImageOptim: Not found")
|
||||
print(" ImageOptim: Not found, download app from https://imageoptim.com/mac and install using 'npm install imageoptim-cli'")
|
||||
return false
|
||||
}
|
||||
} catch {
|
||||
@ -36,7 +36,7 @@ private func checkMagickAvailability() -> Bool {
|
||||
let output = try safeShell("magick --version")
|
||||
guard let version = output.components(separatedBy: "ImageMagick ").dropFirst().first?
|
||||
.components(separatedBy: " ").first else {
|
||||
print(" Magick: Not found")
|
||||
print(" Magick: Not found, install using 'brew install imagemagick'")
|
||||
return false
|
||||
}
|
||||
print(" Magick: \(version)")
|
||||
@ -54,7 +54,7 @@ private func checkCwebpAvailability() -> Bool {
|
||||
if version.count > 1 {
|
||||
print(" cwebp: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||
} else {
|
||||
print(" cwebp: Not found")
|
||||
print(" cwebp: Not found, download from https://developers.google.com/speed/webp/download")
|
||||
return false
|
||||
}
|
||||
} catch {
|
||||
@ -71,7 +71,7 @@ private func checkAvifAvailability() -> Bool {
|
||||
if version.count > 1 {
|
||||
print(" avif: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||
} else {
|
||||
print(" avif: Not found")
|
||||
print(" avif: Not found, install using 'npm install avif'")
|
||||
return false
|
||||
}
|
||||
} catch {
|
||||
@ -90,7 +90,7 @@ private func checkUglifyJsAvailability() -> Bool {
|
||||
print(" uglify-js: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||
} else {
|
||||
print("'\(output)'")
|
||||
print(" uglify-js: Not found")
|
||||
print(" uglify-js: Not found, install using 'npm install uglify-js'")
|
||||
return false
|
||||
}
|
||||
} catch {
|
||||
@ -108,7 +108,7 @@ private func checkCleanCssAvailability() -> Bool {
|
||||
if version.count > 1 {
|
||||
print(" cleancss: \(version.map { "\($0)" }.joined(separator: "."))")
|
||||
} else {
|
||||
print(" cleancss: Not found")
|
||||
print(" cleancss: Not found, install using 'npm install clean-css-cli'")
|
||||
return false
|
||||
}
|
||||
} catch {
|
||||
|
@ -1,6 +1,12 @@
|
||||
#!/bin/bash
|
||||
# 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`)
|
||||
# https://github.com/mishoo/UglifyJS
|
||||
npm install uglify-js -g
|
||||
|
Loading…
Reference in New Issue
Block a user