PHPackages                             jasonlewis/basset - 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. jasonlewis/basset

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

jasonlewis/basset
=================

A better asset management package for Laravel.

v4.0.0-BETA2(12y ago)24063.4k75[43 issues](https://github.com/jasonlewis/basset/issues)[8 PRs](https://github.com/jasonlewis/basset/pulls)1PHPPHP &gt;=5.3.0CI failing

Since May 17Pushed 12y ago19 watchersCompare

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

READMEChangelogDependencies (9)Versions (4)Used By (1)

No Longer Maintained
--------------------

[](#no-longer-maintained)

Basset is no longer being maintained by me (Jason Lewis). Appologies to those of you that have invested time into this package. Feel free to fork it if you feel the need but I strongly urged you to shift over to using [Grunt](http://gruntjs.com/) to manage the compiling and concatenation of your assets.

Once again, I'm sorry, I just don't have the time and Grunt does an amazing job.

Basset for Laravel 4
--------------------

[](#basset-for-laravel-4)

[![Build Status](https://camo.githubusercontent.com/20bb0f3bb1070cfc131c194d78b45e3c199a14309736a8dff865bddc788a0842/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6a61736f6e6c657769732f6261737365742e706e67)](http://travis-ci.org/jasonlewis/basset)

Basset is a better asset management package for the Laravel framework. Basset shares the same philosophy as Laravel. Development should be an enjoyable and fulfilling experience. When it comes to managing your assets it can become quite complex and a pain in the backside. These days developers are able to use a range of pre-processors such as Sass, Less, and CoffeeScript. Basset is able to handle the processing of these assets instead of relying on a number of individual tools.

### Installation

[](#installation)

- [Basset on Packagist](https://packagist.org/packages/jasonlewis/basset)
- [Basset on GitHub](https://github.com/jasonlewis/basset)

To get the latest version of Basset simply require it in your `composer.json` file.

```
"jasonlewis/basset": "dev-master"

```

You'll then need to run `composer install` to download it and have the autoloader updated.

> Note that once Basset has a stable version tagged you should use a tagged release instead of the master branch.

Once Basset is installed you need to register the service provider with the application. Open up `app/config/app.php` and find the `providers` key.

```
'providers' => array(

    'Basset\BassetServiceProvider'

)

```

Basset also ships with a facade which provides the static syntax for creating collections. You can register the facade in the `aliases` key of your `app/config/app.php` file.

```
'aliases' => array(

    'Basset' => 'Basset\Facade'

)

```

### Documentation

[](#documentation)

[View the official documentation](http://jasonlewis.me/code/basset/4.0).

### Changes

[](#changes)

#### v4.0.0 Beta 3

[](#v400-beta-3)

- Split the collections and aliases into their own configuration files.
- Filter method chaining with syntactical sugar by prefixing with `and`, e.g., `andWhenProductionBuild()`.

#### v4.0.0 Beta 2

[](#v400-beta-2)

- Added logging when assets, directories, and filters are not found or fail to load.
- Allow logging to be enabled or disabled via configuration.
- Warn users when cURL is being used to detect an assets group.
- Allow an array of filters to be applied to an asset.
- Added `whenProductionBuild` and `whenDevelopmentBuild` as filter requirements.
- `CssMin` and `JsMin` are only applied on a production build and not on the production environment.
- Added `raw` method as an alias to `exclude`.
- Entire directory or collection can be set as raw so original path is used instead of assets being built.
- Development builds only happen for a collection that is used on the loaded request.
- Added `rawOnEnvironment` to serve the asset raw on a given environment or environments.

#### v4.0.0 Beta 1

[](#v400-beta-1)

- Collections are displayed with `basset_javascripts()` and `basset_stylesheets()`.
- Simplified the asset finding process.
- Can no longer prefix paths with `path:` for an absolute path, use a relative path from public directory instead.
- Requirements can be applied to filters to prevent application if certain conditions are not met.
- Filters can find any missing constructor arguments such as the path to Node, Ruby, etc.
- Default `application` collection is bundled.
- `basset:compile` command is now `basset:build`.
- Old collection builds are cleaned automatically but can be cleaned manually with `basset --tidy-up`.
- Packages can be registered with `Basset::package()` and assets can be added using the familiar namespace syntax found throughout Laravel.
- `Csso` support with `CssoFilter`.
- Fixed issues with `UriRewriteFilter`.
- Development collections are pre-built before every page load.
- Build and serve pre-compressed collections.
- Use custom format when displaying collections.
- Added in Blade view helpers: `@javascripts`, `@stylesheets`, and `@assets`.
- Assets maintain the order that they were added.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.5% 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 ~22 days

Total

2

Last Release

4727d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b19e3b0aa7122af110d0a57006cfff2e519203f3f3bddd419c36875e0dfba45d?d=identicon)[jasonlewis](/maintainers/jasonlewis)

---

Top Contributors

[![jasonlewis](https://avatars.githubusercontent.com/u/829059?v=4)](https://github.com/jasonlewis "jasonlewis (331 commits)")[![arthurdarcet](https://avatars.githubusercontent.com/u/973454?v=4)](https://github.com/arthurdarcet "arthurdarcet (2 commits)")[![etrepat](https://avatars.githubusercontent.com/u/148851?v=4)](https://github.com/etrepat "etrepat (1 commits)")[![gregatetr](https://avatars.githubusercontent.com/u/1903696?v=4)](https://github.com/gregatetr "gregatetr (1 commits)")[![knnethdw](https://avatars.githubusercontent.com/u/3512335?v=4)](https://github.com/knnethdw "knnethdw (1 commits)")

---

Tags

laravelassetsbasset

### Embed Badge

![Health badge](/badges/jasonlewis-basset/health.svg)

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

###  Alternatives

[backpack/basset

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 10+.

202832.4k6](/packages/backpack-basset)[jasonlewis/resource-watcher

Simple PHP resource watcher library.

221145.8k14](/packages/jasonlewis-resource-watcher)[digitallyhappy/assets

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 8+.

13973.4k9](/packages/digitallyhappy-assets)[efficiently/jquery-laravel

This package provides jQuery and the jQuery-ujs driver for your Laravel &gt;= 6 application.

1311.0k1](/packages/efficiently-jquery-laravel)

PHPackages © 2026

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