Download the PHP package rosswintle/statamic-asset-cache without Composer

On this page you can find all versions of the php package rosswintle/statamic-asset-cache. 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 statamic-asset-cache

Statamic Asset Cache

A Statamic addon that automates downloading CSS and JS assets from CDNs so that they can be self hosted.

This is a Statamic tag based on my Laravel Asset Cache package.

Installation

Use the following versions (I think - pre v3.x may not have been accurate):

Install the package with composer:

Cached assets are stored in and served from the public file storage "disk". You will need to have symlinked your public/storage directory to storage/app/public as per the Laravel docs using:

Be sure to do this in ALL environments: local, staging, and production, if you haven't already.

Usage

The Statamic tag is:

The tag outputs the URL of the locally-cached file from the package.

Example:

You can also use this for CSS:

What does this do?

Using the tag:

What problem does this solve?

It saves you having to manually download assets and include them in your project if you want to host them locally.

There are various reasons why you may want to do this, such as avoiding having your users tracked, to avoid depending on third-party CDNs and there are possible performance benefits too.

I'm also on a mission to ditch npm and build process from simple projects, so this bit of automation seemed useful.

If you dare specify an imprecise version constraint such as just 1.9 you can also get latest releases of dependencies without having to do anything! But all the big CDN's advise against this as it can break your site so use with caution and avoid in production environments!!

Compatibility

This package was built for and tested with Statamic 3 (beta) and Laravel 6.x, but should work on newer versions.

Limitations

This is my first public package and Statamic addon. All sorts of things could be wrong! Please be gentle.

More limitations are given in the package's readme

Roadmap

See the package's roadmap

Credits


All versions of statamic-asset-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2|^8.3|^8.4
rosswintle/laravel-asset-cache Version ^4.0
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 rosswintle/statamic-asset-cache contains the following files

Loading the files please wait ...