Split minify options for CSS and JS

This commit is contained in:
Christoph Hagen
2022-12-10 22:28:39 +01:00
parent 3991211e37
commit 31923974a6
5 changed files with 24 additions and 13 deletions

View File

@ -21,12 +21,20 @@ struct Configuration: Codable {
let fullScreenImageWidth: Int
/**
Automatically minify all `.css` and `.js` resources which are copied
Automatically minify all `.css` resources which are copied
to the output folder.
- Note: This option requires the `uglifyjs` and `clean-css` tools,
- Note: This option requires the `clean-css` tool,
which can be installed using the `install.sh` script in the root folder of the generator.
*/
let minifyCSSandJS: Bool
let minifyCSS: Bool
/**
Automatically minify all `.js` resources which are copied
to the output folder.
- Note: This option requires the `uglifyjs` tool,
which can be installed using the `install.sh` script in the root folder of the generator.
*/
let minifyJavaScript: Bool
/**
The path to the directory where the root element metadata is located.
@ -76,8 +84,8 @@ struct Configuration: Codable {
print(" Output folder: \(outputDirectory.path)")
print(" Page width: \(pageImageWidth)")
print(" Full-screen width: \(fullScreenImageWidth)")
print(" Minify JavaScript: \(minifyCSSandJS)")
print(" Minify CSS: \(minifyCSSandJS)")
print(" Minify JavaScript: \(minifyJavaScript)")
print(" Minify CSS: \(minifyCSS)")
print(" Create markdown files: \(createMdFilesIfMissing)")
}
}