2017 © Pedro Peláez
 

kirby-plugin kirby-laravel-mix-helper

Helper to use Version Busting of Laravel Mix

image

wnx/kirby-laravel-mix-helper

Helper to use Version Busting of Laravel Mix

  • Thursday, March 29, 2018
  • by stefanzweifel
  • Repository
  • 1 Watchers
  • 3 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 20 % Grown

The README.md

kirby-laravel-mix-helper

Kirby Plugin to use laravel-mix's Versioning / Cache Busting., (*1)

Installation

Place kirby-laravel-mix-helper.php into /site/plugins/kirby-laravel-mix-helper folder., (*2)

Advanced: Composer

You can also install this plugin through composer. Execute the following command in the root of your kirby plugin. Composer will place the files automatically in the plugins directory., (*3)

composer require wnx/kirby-laravel-mix-helper

Change Installation Path

If you have a custom folder structure in your kirby project, you can also adjust the installation path within your composer.json. Add the following setting:, (*4)

"extra": {
    "installer-paths": {
        "dist/site/plugins/kirby-laravel-mix-helper": ["wnx/kirby-laravel-mix-helper"]
    }
}

Advanced: Git Submodules

git submodule add https://github.com/stefanzweifel/kirby-laravel-mix-helper.git site/plugins/kirby-laravel-mix-helper

Usage

After installing the plugin the mix() helper is available to you. In your template you can then use it in your link- and script-tags like this:, (*5)

<link rel="stylesheet" href="<?php echo mix('/assets/css/main.css') ?>">

The mix helper will read your mix-manifest.json file and append the cache busting ID to the asset path. The rendered HTML will look like this:, (*6)

<link rel="stylesheet" href="/assets/css/main.css?id=0ae511c15cfbd440f579">

Configuration

The plugin comes with one configuration option: mix.manifest. Add it to your config.php file if your mix-manifest.json file is stored at a custom path., (*7)

c::set('mix.manifest', 'assets/mix-manifest.json');

License

MIT, (*8)

The Versions

29/03 2018

dev-master

9999999-dev https://github.com/stefanzweifel/kirby-laravel-mix-helper

Helper to use Version Busting of Laravel Mix

  Sources   Download

MIT

The Requires

 

plugin laravel cms laravel-mix kirby

29/03 2018

v1.0.0

1.0.0.0 https://github.com/stefanzweifel/kirby-laravel-mix-helper

Helper to use Version Busting of Laravel Mix

  Sources   Download

MIT

The Requires

 

plugin laravel cms laravel-mix kirby