Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robrwo/mojolicious-plugin-text-minify
remove HTML indentation on the fly
https://github.com/robrwo/mojolicious-plugin-text-minify
Last synced: 11 days ago
JSON representation
remove HTML indentation on the fly
- Host: GitHub
- URL: https://github.com/robrwo/mojolicious-plugin-text-minify
- Owner: robrwo
- Created: 2021-09-09T12:09:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T19:08:23.000Z (over 1 year ago)
- Last Synced: 2024-10-11T21:56:27.406Z (about 1 month ago)
- Language: Perl
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Mojolicious::Plugin::Text::Minify - remove HTML indentation on the fly
# VERSION
version v0.2.4
# SYNOPSIS
```
# Mojolicious::Lite
plugin "Text::Minify";# Mojolicious
$app->plugin("Text::Minify");
```# DESCRIPTION
This plugin uses [Text::Minify::XS](https://metacpan.org/pod/Text%3A%3AMinify%3A%3AXS) to remove indentation and
trailing whitespace from HTML content.If the `mojox.no-minify` key in the stash is set to a true value,
then the result will not be minified.You can also use of the minifier conditional on the application mode
```
plugin 'Text::Minify' if app->mode eq "production";
```Note that this is naive minifier which does not understand markup, so
newlines will still be collapsed in HTML elements where whitespace is
meaningful, e.g. `pre` or `textarea`.# SUPPORT FOR OLDER PERL VERSIONS
This module requires Perl v5.16, which is the same minimum version that the current version of [Mojolicious](https://metacpan.org/pod/Mojolicious) requires.
Future releases may only support Perl versions released in the last ten years.
# SEE ALSO
[Text::Minify::XS](https://metacpan.org/pod/Text%3A%3AMinify%3A%3AXS)
[Plack::Middleware::Text::Minify](https://metacpan.org/pod/Plack%3A%3AMiddleware%3A%3AText%3A%3AMinify)
# SOURCE
The development version is on github at [https://github.com/robrwo/Mojolicious-Plugin-Text-Minify](https://github.com/robrwo/Mojolicious-Plugin-Text-Minify)
and may be cloned from [git://github.com/robrwo/Mojolicious-Plugin-Text-Minify.git](git://github.com/robrwo/Mojolicious-Plugin-Text-Minify.git)# BUGS
Please report any bugs or feature requests on the bugtracker website
[https://github.com/robrwo/Mojolicious-Plugin-Text-Minify/issues](https://github.com/robrwo/Mojolicious-Plugin-Text-Minify/issues)When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.# AUTHOR
Robert Rothenberg
# COPYRIGHT AND LICENSE
This software is Copyright (c) 2021-2023 by Robert Rothenberg.
This is free software, licensed under:
```
The Artistic License 2.0 (GPL Compatible)
```