GithubHelp home page GithubHelp logo

ifa6 / nginx-minify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nginx-modules/nginx-minify

0.0 3.0 0.0 181 KB

Simple nginx minify (css, js, html5) perl5

Home Page: http://denji.github.io/nginx-minify

Perl 100.00%

nginx-minify's Introduction

p5-nginx-minify

Nginx Perl Minify [CSS / JS / HTML5]

Depending

FreeBSD

$ portmaster textproc/p5-CSS-Minifier-XS textproc/p5-JavaScript-Minifier-XS textproc/p5-HTML-Packer

Ubuntu/Debian

apt-get install libcss-minifier-xs-perl libjavascript-minifier-xs-perl libhtml-packer-perl

Manual:

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 install

wget 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 install

wget 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

nginx.conf -> /etc/nginx/nginx.conf
mkdir /etc/nginx/perl
Minify.pm -> /etc/nginx/perl/

TODO

  • […] $content_type = "text/html" on fastcgi/proxy after compress
  • […] algorithm cache select path for static

Known 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 ').

nginx-minify's People

Contributors

denji avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.