Download the PHP
package codemonauts/craft-asset-autoversioning without Composer
On this page you can find all versions of the php package
codemonauts/craft-asset-autoversioning. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor codemonauts Package craft-asset-autoversioning Short Description A Twig extension for Craft CMS that helps you cache-bust your assets. License
MIT
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.
Informations about the package craft-asset-autoversioning
Assets Autoversioning plugin for Craft CMS
A really basic Twig extension for CraftCMS that helps you cache-bust your assets.
Background
To force the browser to download the new asset file after a update, the plugin allows you to add a Twig function, which adds the build number or the filemtime to the filename.
Requirements
Craft CMS >= 4.0.0
Installation
Project
Open your terminal and go to your Craft project:
CI/CD Pipeine
The build number which gets added to the asset URL is read from a file called build.txt which must exist in your project folder. Use for example something like this in your deployment script (Example is for CodeShip):
If the file doesn't exists, the filemtime of the asset is used.
Webserver
Because the clients will from now on start to request files like /css/styles.12345678.css we need to tell the webserver how to rewrite these URLs so that the original /css/styles.css will get served.
Apache
NGINX
Usage
Use the new Twig function in your template. For example in pug:
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 codemonauts/craft-asset-autoversioning contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.