2017 © Pedro Peláez
 

library coffee-closure

image

galvani/coffee-closure

  • Saturday, April 6, 2013
  • by galvani
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

coffee-closure

Symfony 2 bundle for coffee script support and google closure support, (*1)

This package is dependent Michael's Bolin's coffee-script compiler, (*2)

INSTALL

add these lines to composer.json:, (*3)

"repositories": {
            "bolinfest/coffee-script": {

                    "type": "package",
                    "package": {
                            "name": "bolinfest/coffee-script",
                            "version": "1.1",
                            "source": {
                                    "url": "https://github.com/bolinfest/coffee-script.git",
                                    "type": "git",
                                    "reference": "origin/1.1.0"
                            }
                    }
            }
    }

register bundle in your AppKernel:, (*4)

new Galvani\CoffeeClosureBundle\CoffeeClosureBundle()

add configuration options to your config:, (*5)

coffee_closure:
    bin: "/usr/bin/env coffee"
    closure: "src/Galvani/PocketBoyBundle/Resources/public/js/"
    src: "src/Galvani/PocketBoyBundle/Resources/public/coffee"
    bundles: [ "GalvaniPocketBoyBundle" ]

The bundle will scan Resources/public/coffee and compile all .coffee files in Resources/public/js, (*6)

Example of application entry point, which needs to be inside the Resources/public/js:

app.js:, (*7)

goog.provide('app.start');

goog.require('goog.dom');
goog.require('pocketboy');

app.start = function() {
  var pocketboyApplication = new pocketboy();
  pocketboyApplication.start();
};

// Ensures the symbol will be visible after compiler renaming.
goog.exportSymbol('app.start', app.start);

and in you html simply add:, (*8)

<script>goog.require('app.start'); app.start();</script>

twig example using assetic:, (*9)

<script src="{{ asset('bundles/galvanipocketboy/js/closure-library/closure/goog/base.js') }}"></script>
<script src="{{ asset('bundles/galvanipocketboy/js/deps.js') }}"></script>
<script src="{{ asset('bundles/galvanipocketboy/js/app.js') }}"></script>

The Versions

06/04 2013

0.2.4

0.2.4.0

  Sources   Download

MIT

The Requires

 

symfony coffeescript closure coffee google closure coffee script

06/04 2013

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

symfony coffeescript closure coffee google closure coffee script

06/04 2013

0.2.1

0.2.1.0

  Sources   Download

MIT

The Requires

 

symfony coffeescript closure coffee google closure coffee script

25/03 2013

0.1.9

0.1.9.0

  Sources   Download

MIT

The Requires

 

symfony coffeescript closure coffee google closure coffee script

25/03 2013

0.1.8

0.1.8.0

  Sources   Download

MIT

The Requires

 

symfony coffeescript closure coffee google closure coffee script

25/03 2013

0.1.7

0.1.7.0

  Sources   Download

MIT

The Requires

 

symfony coffeescript closure coffee google closure coffee script