Download the PHP package mindkomm/theme-lib-mix without Composer

On this page you can find all versions of the php package mindkomm/theme-lib-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 theme-lib-mix

Mix

A Laravel Mix function for WordPress themes.

The mix() function is useful if you want to enable cache busting for your theme asset files (CSS, JavaScript, images, icon sprites). Laravel Mix allows you to create a mix-manifest.json file, which might look like this:

The ID parameter is a hash of the file contents that changes every time that you make a change to a file. The mix(), mix_child() and mix_any() functions provided in this package allow you to use these hashed URLs for enqueueing your assets in your WordPress theme.

Installation

You can install the package via Composer:

Usage

The mix() function assumes that you have a mix-manifest.json (generated by the version function of Laravel Mix) in the build folder of your theme.

If the mix function can’t find your asset file in the manifest file, it will return the asset URL through get_theme_file_uri as a fallback.

Functions

Name Return Type Summary/Returns
mix() string Gets the path to a versioned Mix file in a theme.

Returns: The versioned file URL.
mix_child() string Gets the path to a versioned Mix file in a child theme.

Returns: The versioned file URL.
mix_any() string Gets the path to a versioned Mix file outside of your theme folders.

Returns: The versioned file URL.

mix()

Gets the path to a versioned Mix file in a theme.

Use this function if you want to load theme dependencies. This function will cache the contents of the manifest files for you.

since 1.0.0

mix( string $path, array $args = [] )

Returns: string The versioned file URL.

Name Type Description
$path string The relative path to the file.
$args array Optional. An array of arguments for the function.
  • (bool) $is_child – Whether to check the child directory first. Default false.
  • (string) $manifest_directory – Custom relative path to manifest directory. Default build.

mix_child()

Gets the path to a versioned Mix file in a child theme.

Similar to mix(), but tries to load a file from the child theme first.

since 1.2.0

mix_child( string $path, array $args = [] )

mix_any()

Gets the path to a versioned Mix file outside of your theme folders.

The difference to the mix() function is that for this function, you need to provide the absolute paths to the file and the manifest directory. The benefit is that it’s more versatile and that you can use it for functionality that might not live in a theme, but in a plugin, vendor packages or in a symlinked package.

since 1.1.0

mix_any( string $path, string $manifest_directory, string $manifest_name = mix-manifest.json )

Returns: string The versioned file URL.

Name Type Description
$path string The full path to the file.
$manifest_directory string The full path to the manifest directory.
$manifest_name string Optional. The name of the manifest file in $manifest_directory. Default mix-manifest.json.

Support

This is a library that we use at MIND to develop WordPress themes. You’re free to use it, but currently, we don’t provide any support.


All versions of theme-lib-mix with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.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 mindkomm/theme-lib-mix contains the following files

Loading the files please wait ....