Download the PHP package fballiano/openmage-cssjs-versioning without Composer

On this page you can find all versions of the php package fballiano/openmage-cssjs-versioning. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package openmage-cssjs-versioning

CSS/JS Versioning module for OpenMage/Magento1

If you find my work valuable, please consider sponsoring
Sponsor me on GitHub Buy me a coffee Donate via PayPal

Quick description

Adds ?v= to all your CSS/JS and the value of v is the last git commit hash.

Rationale

To make search engines happy you need to use very long browser's cache lifetime (with or without a CDN), but if you tell browsers to cache a css or a js for 1 year and then you need to modify it? The browsers won't receive the new version and your website will break.

My solution is to add a v=xxx parameter to all CSS/JS URLs, this way the cache will be forced to update and the new version of the files will be stored in cache until the next update.

In order to do that reliably and consistently I've created this module that intercepts the http_response_send_before event, uses as little preg_regex as possible in order to be as performant as possible to add the v=xxx parameter.

This approach should work also with full page cache modules.

Features

How to gen the version number to use in the v=xxx parameter?

This module supports 2 approaches:

  1. using the last Git commit hash (only the first 6 characters) as the version number
  2. if that fails then a timestamp is used

The git method is preferred because the generated version number won't change unless a new change is pushed on the repository. However, in order to work, OpenMage base dir must also be the Git project root directory and the .git folder has to be present in all servers you need this functionality to work.

Resuming:

Limitations:

Warning

This module is provided "as is" and I'll not be responsible for any problem or damage.

Installation

Install via composer (composer require fballiano/openmage-cssjs-versioning), modman (modman clone https://github.com/fballiano/openmage-cssjs-versioning) or any other way you like

Support

If you have any issues with this extension, open an issue on GitHub.

Contribution

Any contributions are highly appreciated. The best way to contribute code is to open a pull request on GitHub.

Developer

Fabrizio Balliano
http://fabrizioballiano.com
@fballiano

Licence

OSL - Open Software Licence 3.0

Copyright

(c) Fabrizio Balliano


All versions of openmage-cssjs-versioning with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
magento-hackathon/magento-composer-installer Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fballiano/openmage-cssjs-versioning contains the following files

Loading the files please wait ....