GithubHelp home page GithubHelp logo

isabella232 / minqueue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hareko/minqueue

0.0 0.0 0.0 689 KB

WordPress Plugin: Minify and concatenate enqueued scripts and styles

PHP 95.79% Java 3.70% JavaScript 0.50%

minqueue's Introduction

=== MinQueue ===
Contributors: mattheu
Tags: minify, script, style, concatenate
Requires at least: 3.4
Tested up to: 3.5
Stable tag: 1.1.2

Minify & Concatenate Enqueued Scripts & Styles.

== Description ==

Minification & concatenation of JS and CSS files can reduce the file size of your assets, and reduce the number of HTTP requests, helping improve page load times.

The plugin takes a manually defined list of script/style handles, and minifies and concatenates them into a single file which is then cached for future use.

**Features.**

* Minifies & concatenates scripts and styles loaded using the WordPress dependency enqueueing system.
* Handles scripts loaded in the header & footer.
* Complete control - only a manually defined list of files is processed.
* Multiple, independently processed files.
* Minified files are only loaded if at least one component file should be loaded.
* Compatable with localized scripts.
* Helper tool - displays a list of scripts and styles enqueued on each page on the front end of the site.

== Installation ==

Install & Activate the plugin.

**Basic Use**

* Enable the plugin front end tool to check what scripts and styles are minified on each page.
* Copy the file handles you want to minify, and paste them into the minify queue textarea on the settings page.
* Save the settings and view the front end of your site. The processed files are generated on page load. Check that everything is working correctly.
* Uncheck the show helper option and save the settings again.

**Advanced use**

* Multiple, independantly proccessed files. You can specify several lists of file handles to be minified and concatenated into separate files. Useful if you have scripts that are loaded conditionally on certain pages and should be handled separately rather than minified and concatenated into one large file.
* Options can be defined in your config file. This then disables access to the settings page in the admin.


== Frequently Asked Questions ==

**Fatal error: Allowed memory size...**

You have probably created an infinite loop when working out the order of depencies.

Example:
Files 1, 2 and 3 are enqueued. File 1 is a dependency of 2, which is a dependency of 3.
If only scripts 1 and 3 are minified and concatenated into 1 file, it will fail. This is because the processed file is now a dependency of file 2, but file 2 is also a dependency of it.

Solution:
You must either process all files together, or process 1 and 3 in separately.


== Changelog ==

= 1.1.1 =
* Fix scripts loaded in the footer that are localized.

= 1.1 =
* Don't make remote requests to the minifier.
* Works behind htaccess.
* Handle scripts enqueued after header scripts outputted.
* CSS files enqueued with media argument set to false should be treated proccessed alongside 'all'

minqueue's People

Contributors

barrykooij avatar mattheu avatar rmccue avatar summatix avatar westonruter avatar willmot 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.