GithubHelp home page GithubHelp logo

brucewu16899 / goez-laravel-grunt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasonmortonnz/laravel-grunt

0.0 2.0 0.0 502 KB

Asset manager for Laravel 4 using the power of Grunt.

Home Page: https://github.com/jaceju/goez-laravel-grunt

PHP 100.00%

goez-laravel-grunt's Introduction

Goez Laravel 4 + Grunt Asset Workflow

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.

Features

Installation

  1. Add the following line to your composer.json "require-dev" array:

    "goez/laravel-grunt": "dev-master"

  2. Run composer update --dev in your terminal.

  3. Add the following line to the end of you app/config.php "providers array":

    'Goez\LaravelGrunt\LaravelGruntServiceProvider',

  4. Run the following command to add the configuration file to your app/config/packages directory:

    php artisan grunt:config

  5. 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.php
    • app/config/packages/goez/laravel-grunt/local/config.php
  6. 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.

Commands

You can use bower and grunt command to manage your assets.

  • bower to list all commands of Bower.
  • grunt --help to list all commands of Grunt.

Assets in view template

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')) }}

Bugs Report

Please report the bugs that you found to Issus page of this package.

Contributors

Original Contributors

This package is base on JasonMortonNZ / laravel-grunt.

Thanks to:

goez-laravel-grunt's People

Contributors

cdarken avatar jaceju avatar jasonmortonnz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.