PHPackages                             venveo/craft-elixir - 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. [Templating &amp; Views](/categories/templating)
4. /
5. venveo/craft-elixir

Abandoned → [venveo/craft-elixir](/?search=venveo%2Fcraft-elixir)ArchivedCraft-plugin[Templating &amp; Views](/categories/templating)

venveo/craft-elixir
===================

Use Laravel's Elixir in Craft CMS templates

v1.0.7(9y ago)1565351PHP

Since Aug 5Pushed 9y ago3 watchersCompare

[ Source](https://github.com/venveo/craft-elixir)[ Packagist](https://packagist.org/packages/venveo/craft-elixir)[ RSS](/packages/venveo-craft-elixir/feed)WikiDiscussions master Synced 4w ago

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

Use Laravel Elixir with Craft CMS
=================================

[](#use-laravel-elixir-with-craft-cms)

You can already use Laravel Elixir with Craft. It's rather straight forward. In fact, Matt Stauffer has an [excellent write up on using Elixir on his company blog](http://blog.tighten.co/setting-up-your-first-vuejs-site-using-laravel-elixir-and-vueify?utm_source=github.com/venveo/craft-elixir).

However, when using a CDN such as [CloudFlare](https://www.cloudflare.com/) or [Fastly](https://www.fastly.com/). You might want to take advantage of file versioning to bust the cache. This plugin lets you use Elixir's built in versioning in your Craft templates!

Requirements
------------

[](#requirements)

[npm](https://www.npmjs.com/)

Installation and Setup
----------------------

[](#installation-and-setup)

If you haven't read the [Elixir documentation on the Laravel website](https://laravel.com/docs/master/elixir) or the blog post above, Here is a quick overview on setting up Elixir.

create a `package.json` with the following content:

```
{
  "private": true,
  "devDependencies": {
    "gulp": "^3.9.1"
  },
  "dependencies": {
    "laravel-elixir": "^5.0.0"
  }
}

```

run the npm install command:

`npm install`

add your SCSS, JavaScript and etc just like a Laravel project under `resources/assets/sass` and `resources/assets/js`.

create a `gulpfile.js` with your contents or copy this one:

```
var elixir = require('laravel-elixir');

elixir(function(mix) {
    mix.sass('app.scss')
        .version('css/app.css');
});

```

Run `gulp watch`!

When using the Elixir version function your CSS/JavaScript will output to `public/css/all-16d570a7.css`. This is where this plugin comes in!

Usage
-----

[](#usage)

With Laravel there is an Elixir PHP helper function that retrieves the correct version. Now you can do this in Craft templates!

Twig Function

```
{{ elixir('css/all.css') }}

```

> *Note:* you can optionally output the entire HTML tag by passing a second argument `true` to the function (e.g `{{ elixir('css/all.css', true) }}`.

Twig Filter

```
{{ 'css/all.css' | elixir }}

```

``

and

``

If you are especially lazy, you can have the plugin automatically create the entire tag, based on the file extension.

`{{ craft.elixir.withTag('js/app.js') | raw }}`

This will output the `` or `` tags appropriately.

Credits
-------

[](#credits)

- [Jason McCallister](https://github.com/themccallister)
- [Carlo Latiano](https://github.com/carlolaitano)
- [Ransom Roberson](https://github.com/mosnar)

About Venveo
------------

[](#about-venveo)

Venveo is a Digital Marketing Agency for Building Materials Companies in Blacksburg, VA. Learn more about us on [our website](https://www.venveo.com).

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 90.6% 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 ~48 days

Total

4

Last Release

3469d ago

### Community

Maintainers

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

---

Top Contributors

[![jasonmccallister](https://avatars.githubusercontent.com/u/5354908?v=4)](https://github.com/jasonmccallister "jasonmccallister (29 commits)")[![incraigulous](https://avatars.githubusercontent.com/u/5910297?v=4)](https://github.com/incraigulous "incraigulous (1 commits)")[![marcusmoore](https://avatars.githubusercontent.com/u/1141514?v=4)](https://github.com/marcusmoore "marcusmoore (1 commits)")[![Mosnar](https://avatars.githubusercontent.com/u/3810939?v=4)](https://github.com/Mosnar "Mosnar (1 commits)")

---

Tags

craftcraftcmscssjavascriptlaravel-elixirphp

### Embed Badge

![Health badge](/badges/venveo-craft-elixir/health.svg)

```
[![Health](https://phpackages.com/badges/venveo-craft-elixir/health.svg)](https://phpackages.com/packages/venveo-craft-elixir)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[pressbooks/pressbooks-book

This theme is named after Canadian media theorist Marshall McLuhan, who coined the phrase “the medium is the message.” It is designed for academic writing and is also suitable for fiction. Headings are set in Cormorant Garamond, and body type is set in Lora.

206.7k](/packages/pressbooks-pressbooks-book)[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[nystudio107/minify

A simple plugin that allows you to minify blocks of HTML, CSS, and JS inline in Craft CMS templates.

1062.0k](/packages/nystudio107-minify)[octfx/template-styles-extender

Extends TemplateStyles with new CSS properties

105.6k](/packages/octfx-template-styles-extender)

PHPackages © 2026

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