2017 © Pedro Peláez
 

library l4-asset-handlebars

image

codesleeve/l4-asset-handlebars

  • Sunday, December 22, 2013
  • by kelt
  • Repository
  • 2 Watchers
  • 3 Stars
  • 18,666 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Laravel 4 Asset Pipeline Package For Handlebars.js

Bring in your .jst.hbs JST templates and also Handlebars into your Laravel 4 application., (*1)

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require codesleeve/l4-asset-handlebars., (*2)

It might look something like:, (*3)

  "require": {
    "laravel/framework": "4.0.*",
    "codesleeve/l4-asset-handlebars": "dev-master"
  }

Next, update Composer from the Terminal:, (*4)

    composer update

Once this operation completes, add the service provider. Open app/config/app.php, and add a new item to the providers array., (*5)

    'Codesleeve\L4AssetHandlebars\L4AssetHandlebarsServiceProvider'

Usage

Once installed you can add this your Asset pipeline manifest file [laravel_root]/app/assets/javascripts/application.js, (*6)

    //= require handlebars

Now create a file app/assets/javascripts/myfirst.jst.hbs, (*7)

    <div> Put some html here, {{smeagol}} </div>

After refreshing the page inspect JST object in the javascript console and the function, (*8)

    JST['myfirst']({smeagol: 'precious!!!'})

which should give you, (*9)

    <div> Put some html here, previous </div>

The Versions

22/12 2013

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

by Travis

17/12 2013

v1.4

1.4.0.0

  Sources   Download

The Requires

 

The Development Requires

by Travis

29/11 2013

dev-refactor

dev-refactor

  Sources   Download

The Requires

 

by Travis

26/08 2013

v1.2

1.2.0.0

  Sources   Download

The Requires

 

by Travis