laravel-mix-zip

Zip files during the laravel mix pipeline

Usage no npm install needed!

<script type="module">
  import laravelMixZip from 'https://cdn.skypack.dev/laravel-mix-zip';
</script>

README

Laravel Mix Zip

Latest Version on NPM Software License Total Downloads

This extension allows you to automatically zip files after mix finishes running.

Please make sure that you are using laravel-mix version 4.0 or higher.

Usage

You can install the package with npm or yarn:

npm install laravel-mix-zip --save-dev
yarn add laravel-mix-zip --dev

Then require the extension in your Mix configuration:

const mix = require('laravel-mix');

require('laravel-mix-zip');
...

Enable the extension by calling .zip() at the end of your Mix chain:

mix.sass('resources/sass/app.scss', 'public/css').zip(['app'], ['composer.json'], 'deploy.zip');

Zips the app folder and composer.json file to deploy.zip

License

The MIT License (MIT). Please see License File for more information.