This package isn't stable for production. Testing and bug reporting are welcome.
- Includes Compass, RequireJS. (References to generator-webapp of Yeoman.)
- Helper for Laravel View.
-
Add the following line to your composer.json
"require-dev"array:"goez/laravel-grunt": "dev-master" -
Run
composer update --devin your terminal. -
Add the following line to the end of you
app/config.php"providers array":'Goez\LaravelGrunt\LaravelGruntServiceProvider', -
Run the following command to add the configuration file to your
app/config/packagesdirectory:php artisan grunt:config -
You can configure the path of assets, and published files. This configuration file is located in your project's config directory, as below:
app/config/packages/goez/laravel-grunt/config.phpapp/config/packages/goez/laravel-grunt/local/config.php
-
Finally, run the following command to generate all metadata files and install packages in your app:
php artisan grunt:setup
Note 1: You can edit the package.json, bower.json, Grunfile.js directly after they are generated.
Note 2: You must rerun grunt:config and grunt:setup after you update this package with composer.
You can use bower and grunt command to manage your assets.
-
bowerto list all commands of Bower. -
grunt --helpto list all commands of Grunt.
You can use the 'grunt_asset' helper to get asset url. Here are examples on blade template:
<link rel="stylesheet" href="{{ grunt_asset('styles/hello.css') }}"/>
<script src="{{ grunt_asset('styles/hello.css') }}"></script>
or:
{{ HTML::style(grunt_asset('scripts/hello.js')) }}
{{ HTML::script(grunt_asset('scripts/hello.js')) }}
Please report the bugs that you found to Issus page of this package.
- Jace Ju : GitHub
This package is base on JasonMortonNZ / laravel-grunt.
Thanks to:
- Jason Morton : Github | Twitter @JasonMortonNZ
- Thomas Clarkson : Github | Twitter @thomasclarkson9