2017 © Pedro Peláez
 

library coffeescript

Coffeescript module for ZF2.

image

blake/coffeescript

Coffeescript module for ZF2.

  • Friday, August 30, 2013
  • by Panoptisis
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

ZF2 CoffeeScript Module

About

This module provides inline support for CoffeeScript in ZF2 views using alxlit's PHP CoffeeScript Compiler., (*1)

Installation

Installing this modul is quite simple using Composer. First, add this to your composer.json:, (*2)

"require": {
    ...
    "blake/coffeescript": "0.*"
}

Set this requirement up with the usual composer.phar install command. And finally, you need to add this to your ZF2 application.config.php:, (*3)

// ...
'modules' => array(
    // ...
    'Blake\CoffeeScript',
    // ...
),
// ...

Usage

With this installed, you can call appendCoffeeScript() off of the HeadScript or InlineScript view helpers., (*4)

$this->inlineScript()->appendCoffeeScript(<<<COFFEESCRIPT
    console.log 'Hello, syntax.'
COFFEESCRIPT
);

Additionally, there is a dedicated CoffeeScript invokable view helper that will simply compile CoffeeScript., (*5)

echo $this->coffeeScript(<<<COFFEESCRIPT
    console.log 'Another lame example.'
COFFEESCRIPT
);

Compiler Options

Both of the helpers illustrated above take a second, optional, argument that is a array of options to pass on to the CoffeeScript compiler. You can see a list of these options on the official PHP CoffeeScript documentation., (*6)

By default, the options passed to the compiler are:, (*7)

$options = array(
    'bare' => true,
    'header' => false,
);

These can be overriden by passing your own options., (*8)

The Versions

30/08 2013

dev-master

9999999-dev https://github.com/Panoptisis/coffeescript

Coffeescript module for ZF2.

  Sources   Download

MIT

The Requires

 

zf2 module coffeescript

30/08 2013

v0.1.3

0.1.3.0 https://github.com/Panoptisis/coffeescript

Coffeescript module for ZF2.

  Sources   Download

MIT

The Requires

 

zf2 module coffeescript

30/08 2013

v0.1.2

0.1.2.0 https://github.com/Panoptisis/coffeescript

Coffeescript module for ZF2.

  Sources   Download

MIT

The Requires

 

zf2 module coffeescript

29/08 2013

v0.1.1

0.1.1.0 https://github.com/Panoptisis/coffeescript

Coffeescript module for ZF2.

  Sources   Download

MIT

The Requires

 

zf2 module coffeescript

29/08 2013

v0.1

0.1.0.0 https://github.com/Panoptisis/coffeescript

Coffeescript module for ZF2.

  Sources   Download

MIT

The Requires

 

zf2 module coffeescript