Download the PHP package tormjens/extended-mix without Composer

On this page you can find all versions of the php package tormjens/extended-mix. 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 extended-mix

Extended Mix

Extended Mix was born in an application that was entirely modular. We needed to load assets from our modules (Composer packages) while also making it possible to hot reload and host assets on a CDN.

This application had modules that were regular Composer packages, so the folder structure would be like.

When pushing to master it was setup to compile assets and push them up to AWS S3, which had a Cloudfront set up.

Locally we wanted to still be able to use HMR (hot reloading) or just compiling the assets to test.

In production we wanted assets to be found via our CDN.

Installation

Grab the package via Composer

This package does not have auto-discovery enabled as the application it is built for loads it and modifies the config for it at runtime. To enable the package you either have to register it via your config/app.php or within a serviceprovider loaded in your "main module".

This example is taken out of the core module of my application.

Getting the URL of an asset

It is actually very simple. Wherever you need the URL to an asset you'll simply use:

Behind the scenes this will pipe the requested file through a series of resolvers to figure out the URL:

  1. It will check to see if the requested file can be requested via hot reloading (very neat locally), and then return the URL to the file with hot reloading enabled.
  2. It will check whether there's a local copy of the file and the return the URL to a proxied asset.
  3. It will check the CDN (if configured), and return the URL.

Also, it does support mix-manifest so you can version your assets.

For cases where some assets are in the manifest, and some not (when you've used the copymethod), you can use the variableAsset function which will look for the asset locally first, then fallback to the CDN.

Proxied local assets

This package provides a convenient way of proxying assets stored locally via a route named mix.show. While this is very neat when testing locally, it is not ideal for production as it bootstraps the entire application just to serve a asset. You should consider adding a rule in your webserver that mimmicks this functionality.

CDN Assets

CDN is supported out of the box, but a convention is necessary to correctly display your assets. By default, we use the format /{vendor}/{package}/{version}/{pathToAsset} to append to your CDN url. That'll mean if your CDN domain is set to https://cdn.foo.com and you want to show get /css/app.css for the foo/bar package, which is installed with version 5.0, you will end up with: https://cdn.foo.com/foo/bar/5.0/css/app.css.

The format may be changed via the mix.driver.cdn.format config option. So if you wanted to omit the vendor you could set this to:

Then it will read the URL as https://cdn.foo.com/bar/5.0/css/app.css.


All versions of extended-mix with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 tormjens/extended-mix contains the following files

Loading the files please wait ....