Download the PHP package diverently/laravel-mix-kirby without Composer

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

Laravel Mix Helper for Kirby

Use the mix helper function to get the correct path to your versioned CSS and JS files generated by Laravel Mix.

Installation

Download

Download and copy this repository to site/plugins/laravel-mix-kirby.

Git submodule

Composer

Laravel Mix

You should also install Laravel Mix, otherwise this plugin is pretty useless ;-) See the installation guide for further information, though it's actually pretty straight forward:

Setup

In your site/config/config.php you can set two options to make this helper work with your specific setup:

diverently.laravel-mix-kirby.manifestPath

This is where the helper function will look for the manifest created by Laravel Mix.

Default: assets/mix-manifest.json

diverently.laravel-mix-kirby.assetsDirectory

This will be prepended to the individual file paths given to the mix() function when creating the final HTML tags.

Default: assets

Options

mix() helper function

The mix() helper function reads the mix-manifest.json file and returns the right HTML tag with the correct path to the requested file. In our example we would call it like so:

And that's it, actually.

Development

  1. If you haven't already, create a package.json inside your project root: npm init -y
  2. Install Laravel Mix: npm install laravel-mix --save-dev
  3. Copy the webpack.mix.js file into your root: cp node_modules/laravel-mix/setup/webpack.mix.js ./

After that you can start using Laravel Mix in your project.

webpack.mix.js

See the official documentation for more information.

NPM scripts

Add the following NPM scripts to your package.json:

License

MIT

Credits

Robert Cordes

Diverently

The idea behind this originally came from the mix Blade helper created for the Laravel framework. This is merely a "translation" for the Kirby CMS, only that it also generates the correct HTML tag depending on what file type you request.


All versions of laravel-mix-kirby with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
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 diverently/laravel-mix-kirby contains the following files

Loading the files please wait ....