minify_html_onepass/cfg/
mod.rs

1/// Configuration settings that can be adjusted and passed to a minification function to change the
2/// minification approach.
3#[derive(Default)]
4pub struct Cfg {
5  /// If enabled, JavaScript in `<script>` tags are minified using
6  /// [minify-js](https://github.com/wilsonzlin/minify-js).
7  ///
8  /// Only `<script>` tags with a valid or no
9  /// [MIME type](https://mimesniff.spec.whatwg.org/#javascript-mime-type) is considered to
10  /// contain JavaScript, as per the specification.
11  pub minify_js: bool,
12
13  /// If enabled, CSS in `<style>` tags are minified.
14  pub minify_css: bool,
15}
16
17impl Cfg {
18  pub fn new() -> Cfg {
19    Cfg::default()
20  }
21}