2017 © Pedro Peláez
 

library minify

A package for minifying styles and javascript for laravel 5

image

nickdekruijk/minify

A package for minifying styles and javascript for laravel 5

  • Wednesday, July 11, 2018
  • by nickdekruijk
  • Repository
  • 1 Watchers
  • 1 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 70 Forks
  • 0 Open issues
  • 15 Versions
  • 64 % Grown

The README.md

Minify

A simple package to minify CSS/SCSS and Javascript on the fly without the need of tools like Laravel Mix or Webpack. It combines all stylesheet files or javascript files into a single, minified file with simple but effective cachebusting with filemtime()., (*1)

Version 2 is a completely new package (version 1 is archived here) using scssphp/scssphp and tedivm/jshrink. Because minify now replaces natxet/cssmin with scssphp it can now compile SASS/SCSS code too!, (*2)

Installation

Begin by installing this package with composer., (*3)

composer require nickdekruijk/minify, (*4)

Upgrading from 1.x

When upgrading change your projects composer.json to require nickdekruijk/minify with at least version "^2.0" and run composer update., (*5)

If you use .gitignore to ignore the old builds in js/builds and css/builds dont' forget to remove them from your .gitignore file and delete all obsolete build .css and .js files., (*6)

You may also need to change the Minify::stylesheet and Minify::javascript calls in your code/views since pathname might change depending on your configuration., (*7)

Laravel installation

Publish the config file if the defaults doesn't suite your needs:, (*8)

php artisan vendor:publish --provider="NickDeKruijk\Minify\MinifyServiceProvider", (*9)

Stylesheet

// app/views/hello.blade.php
<html>
    <head>
        ...
        {!! Minify::stylesheet(['lightbox.css', 'fonts.css', 'styles.css']) !!}
    </head>
    ...
</html>

Javascript

// app/views/hello.blade.php

<html>
    <body>
        ...
        {!! Minify::javascript(['lazyload.min.js', 'scripts.js']) !!}
        <!-- Or: -->
        {!! Minify::javascript(['https://cdn.jsdelivr.net/npm/vanilla-lazyload@12.4.0/dist/lazyload.min.js', 'scripts.js') !!}
    </body>
</html>

Config

See the config file at /config/minify.php, (*10)

The Versions

11/07 2018

dev-master

9999999-dev

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo
by Nick de Kruijk

laravel5 minify

11/07 2018

1.1.2

1.1.2.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo
by Nick de Kruijk

laravel5 minify

06/05 2018

1.1.1

1.1.1.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo
by Nick de Kruijk

laravel5 minify

20/02 2018

1.1.0

1.1.0.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo
by Nick de Kruijk

laravel5 minify

13/08 2017

dev-patch-1

dev-patch-1

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

14/11 2016

dev-S3

dev-S3

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

04/01 2016

1.0.x-dev

1.0.9999999.9999999-dev

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

04/01 2016

1.0.7

1.0.7.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

12/10 2015

1.0.6

1.0.6.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

18/09 2015

1.0.5

1.0.5.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

18/09 2015

1.0.4

1.0.4.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

18/08 2015

1.0.3

1.0.3.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

17/08 2015

1.0.2

1.0.2.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

09/02 2015

1.0.1

1.0.1.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify

05/02 2015

1.0.0

1.0.0.0

A package for minifying styles and javascript for laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Da Costa Alcindo

laravel5 minify