Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nginx-modules/nginx-minify
Simple NGINX minify using Perl5 for CSS/JavaScript/HTML5
https://github.com/nginx-modules/nginx-minify
css html5 java javascript minify nginx perl5
Last synced: 3 months ago
JSON representation
Simple NGINX minify using Perl5 for CSS/JavaScript/HTML5
- Host: GitHub
- URL: https://github.com/nginx-modules/nginx-minify
- Owner: nginx-modules
- Created: 2013-05-06T09:48:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-11T23:18:57.000Z (almost 9 years ago)
- Last Synced: 2024-09-29T18:41:50.130Z (3 months ago)
- Topics: css, html5, java, javascript, minify, nginx, perl5
- Language: Perl
- Homepage:
- Size: 2.93 KB
- Stars: 55
- Watchers: 3
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
p5-nginx-minify
===============Nginx Perl Minify [CSS / JS / HTML5]
Depending
===============
**FreeBSD**
```bash
$ portmaster textproc/p5-CSS-Minifier-XS textproc/p5-JavaScript-Minifier-XS textproc/p5-HTML-Packer
```
**Ubuntu/Debian**
```bash
apt-get install libcss-minifier-xs-perl libjavascript-minifier-xs-perl libhtml-packer-perl
```**Manual**:
* [p5-CSS-Minifier-XS](http://search.cpan.org/dist/CSS-Minifier-XS/lib/CSS/Minifier/XS.pm)
* [p5-JavaScript-Minifier-XS](http://search.cpan.org/dist/JavaScript-Minifier-XS/lib/JavaScript/Minifier/XS.pm)
* [p5-HTML-Packer](http://search.cpan.org/dist/HTML-Packer/lib/HTML/Packer.pm) ([in github](https://github.com/nevesenin/html-packer-perl))```bash
wget http://search.cpan.org/CPAN/authors/id/G/GT/GTERMARS/CSS-Minifier-XS-0.08.tar.gz
tar zxpfv CSS-Minifier-XS-0.08.tar.gz
cd CSS-Minifier-XS-0.08
perl Makefile.PL && make && make installwget http://search.cpan.org/CPAN/authors/id/G/GT/GTERMARS/JavaScript-Minifier-XS-0.09.tar.gz
tar zxpfv JavaScript-Minifier-XS-0.09.tar.gz
cd JavaScript-Minifier-XS-0.09
perl Makefile.PL && make && make installwget http://search.cpan.org/CPAN/authors/id/N/NE/NEVESENIN/HTML-Packer-1.004001.tar.gz
tar zxpfv HTML-Packer-1.004001.tar.gz
cd HTML-Packer-1.004001
perl Makefile.PL && make && make install
```Install
===============
* To copy the file `nginx.conf` into the folder `/etc/nginx/nginx.conf`
* Create folder nginx/perl: `mkdir /etc/nginx/perl`
* To copy the file `Minify.pm` into the folder `/etc/nginx/perl/`Specificity when choosing a platform
===============
* BSD and OS X (`--prefix=/usr/local/etc/nginx`)
* Official repo Linux Nginx (`--prefix=/etc/nginx`)
* Maintainer Ubuntu Nginx, [bug #2](https://github.com/nginx-modules/nginx-minify/issues/2) (`--prefix=/usr/share/nginx`)TODO
===============
* […] $content_type = "text/html" on fastcgi/proxy after compress
* […] algorithm cache select path for staticKnown Problems
===============
http://wiki.nginx.org/HttpPerlModule#Known_Problems
* If a Perl module performs protracted operation, (for example DNS lookups, database queries, etc), then the worker process that is running the Perl script is completely tied up for the duration of script. Therefore embedded Perl scripts should be extremely careful to limit themselves to short, predictable operations.
* It's possible for Nginx to leak memory if you reload the configuration file (via 'kill -HUP ').