PHPackages                             nickdekruijk/minify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nickdekruijk/minify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nickdekruijk/minify
===================

A package for automaticaly minifying CSS, SCSS and Javascript for Laravel

3.0.0(1y ago)611.4k↓40%11MITPHPPHP ^8.2

Since Nov 18Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/nickdekruijk/minify)[ Packagist](https://packagist.org/packages/nickdekruijk/minify)[ RSS](/packages/nickdekruijk-minify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (1)

Minify
======

[](#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().

Version 2 is a completely new package ([version 1 is archived here](https://github.com/nickdekruijk/minify1)) using [scssphp/scssphp](https://github.com/scssphp/scssphp) and [tedivm/jshrink](https://github.com/tedivm/jshrink). Because minify now replaces natxet/cssmin with scssphp it can now compile SASS/SCSS code too!

Installation
------------

[](#installation)

Begin by installing this package with composer.

`composer require nickdekruijk/minify`

Upgrading from 1.x
------------------

[](#upgrading-from-1x)

When upgrading change your projects composer.json to require nickdekruijk/minify with at least version "^2.0" and run `composer update`.

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.

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.

### Laravel installation

[](#laravel-installation)

Publish the config file if the defaults doesn't suite your needs:

`php artisan vendor:publish --provider="NickDeKruijk\Minify\MinifyServiceProvider"`

### Stylesheet

[](#stylesheet)

```
// app/views/hello.blade.php

        ...
        {!! Minify::stylesheet(['lightbox.css', 'fonts.css', 'styles.css']) !!}

    ...

```

### Javascript

[](#javascript)

```
// app/views/hello.blade.php

        ...
        {!! Minify::javascript(['lazyload.min.js', 'scripts.js']) !!}

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

```

### Config

[](#config)

See the config file at `/config/minify.php`

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance60

Regular maintenance activity

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~393 days

Recently: every ~492 days

Total

6

Last Release

406d ago

Major Versions

2.3.1 → 3.0.02025-04-08

PHP version history (2 changes)2.0.0PHP &gt;=7.2.0

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b01fc7c2c39bbe8f87b4afa70ffe1cf2bb787310e1d22fcfed6ae527d4573bb?d=identicon)[nickdekruijk](/maintainers/nickdekruijk)

---

Top Contributors

[![nickdekruijk](https://avatars.githubusercontent.com/u/607302?v=4)](https://github.com/nickdekruijk "nickdekruijk (16 commits)")

---

Tags

javascriptcssJSminifysassscsslaravel5

### Embed Badge

![Health badge](/badges/nickdekruijk-minify/health.svg)

```
[![Health](https://phpackages.com/badges/nickdekruijk-minify/health.svg)](https://phpackages.com/packages/nickdekruijk-minify)
```

###  Alternatives

[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k30.5M336](/packages/matthiasmullie-minify)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.3k](/packages/trentrichardson-cakephp-shrink)[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)[nlac/nlsclientscript

Yii ClientScript extension for prevent reloading javascript and merging/minfying resources

208.2k](/packages/nlac-nlsclientscript)[fisharebest/laravel-assets

Asset management for Laravel

208.1k](/packages/fisharebest-laravel-assets)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
