by JasonMortonNZ

JasonMortonNZ /laravel-grunt

Asset management package for Laravel 4, that harnesses the power of GruntJS

128 Stars 27 Forks Last release: Not found 152 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Please note:

This package is no long being maintained!! Since discovering the Gulp task runner, and finding how easy it is to install, setup and use I've opted to drop GruntJS from my workflow.

Laravel 4 + Grunt Asset Workflow Package - BETA

Please help me by trialing out my package and providing feedback


What this package includes and can do?

This package is design to help with asset management and front-end workflow when developing in Laravel 4.

The package can do the following:

  • compile and minify CSS
  • compile and minify JavaScript
  • compile LESS
  • compile SASS
  • compile Stylus
  • build all asset group with one command
  • Live reload (watches asset files for changes and reloads the browser)
  • ** NOW include support for bower! **


Before using this package please make sure you have bower & node installed globally. This can be done by running the following command:

npm install -g bower && npm install -g grunt-cli

To install the 'Laravel 4 + Grunt Asset Workflow Package' simply add the following to your composer.json


"jason-morton-nz/laravel-grunt": "dev-master"

Then run

composer update --dev
in your terminal.

Next, add the following line to the end of you

"providers array":


Finally, run the following command to add the configuration file to your


php artisan config:publish jason-morton-nz/laravel-grunt
php artisan grunt:config


You can configure many of the settings for this package, by traversing to it's configuration file. This file is located in you project's vendor directory, as below:


This file is heavily commented, so hopefully each setting should be self explanatory.

Note: please try not to edit the

directly. Instead make your required changes in the config.php file, then run
php artisan grunt:setup
to apply the changes.

How to use?

So, how do you use this package? Well we've tried to make it as simple as possible. There's just 3 commands:



command is used to setup your required asset + grunt workflow. You use the command as follows:

php artisan grunt:setup

The command will ask you a selection of questions, and the rest is all done for you.



command will run the grunt task runner and lint, compile, minify all your files, according to how you want things done. You use the command as follows:

php artisan grunt:build



command is used to start a the grunt file watcher. This will watch for any changes made to your front-end workflow files (CSS, JavaScript, LESS, SASS & Stylus), and will then auto-reload your web browser to reflect those changes. You can use the command as follows:

php artisan grunt:watch

Note: That live reload will only work if you have a compatible browser (Chrome & Firefox) with the LiveReload plugin installed.



command will setup
files based upon the configuration settings you've specified in this packages
file. You can add a custom path for bowers vendor folder, as well as stipulate all the bower dependencies you require. All this can be done without touching a single line of JavaScript or JSON. You can use the command as follows:

php artisan bower:setup



command is used to install you bower dependencies. You can use the command as follows:

php artisan bower:install



command update your bower dependencies to newer versions if available. You can use the command as follows:

php artisan bower:update

Issues - how to help?

If you find any bugs, issues errors or believe we could add further useful functionality. Let us know via the github issues page for this project here -


Here's a list of people who have helped by contributing to this project to date:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.