tih-ra / l4-asset-emblem by andriybazyuta

Laravel 4 Asset Pipeline Package For Emblem.js
26
0
2
Package Data
Maintainer Username: andriybazyuta
Maintainer Contact: andriy.bazyuta@gmail.com (Andriy Bazyuta)
Package Create Date: 2014-01-24
Package Last Update: 2014-01-24
Language: JavaScript
License: Unknown
Last Refreshed: 2024-11-23 03:25:46
Package Statistics
Total Downloads: 26
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel 4 Asset Pipeline Package For Emblem.js

Bring in your .emblem templates into your Laravel 4 application.

Installation

Edit your project's composer.json file to require andriybazyuta/l4-asset-emblem.

It might look something like:

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

Next, update Composer from the Terminal:

    composer update

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

    'Andriybazyuta\L4AssetEmblemjs\L4AssetEmblemjsServiceProvider'

Usage

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

	//= require handlebars
  //= require ember
  and
  <?= javascript_include_tag("emblem") ?> in your view

Now create a file app/assets/javascripts/myfirst.jst.hbs

	Put some .emblem templates to, /assets/javascript/templates of /assets/javascript/SOME_FOLDER/templates  folder 

After refreshing the page inspect JST object in the javascript console and the function

  Ember.TEMPLATES["mytemplate"] = Emblem.compile(Ember.Handlebars, "template content");