loginwashere/php-closure

Fork of php closure class for working with google closure compiler api

Installs: 35

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/loginwashere/php-closure

0.0.1 2013-02-10 20:07 UTC

This package is not auto-updated.

Last update: 2026-01-31 19:19:18 UTC


README

Build Status

This is a fork of php-closure class for working with google closure compiler api that I found on Google Code

Documentation

Will be available on phpclosure.readthedocs.org

Installation

It is assumed that library will be used with composer, so installation steps are:

  1. Install composer
  2. Add resent wersion of library to composer.json of your project.
{
    "require": {
        "loginwashere/php-closure": "*"
    }
}
  1. run command php path/to/composer.phar install (or php path/to/composer.phar update - if you've already executed install)

Usage

$c = new PhpClosure();
$c->add("path/to/js/my-app.js") // File must exist and be readable
    ->add("path/to/js/popup.js") // File must exist and be readable
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir("path/to/tmp/js-cache/") // Directory must exist and be writable
    ->write();

or

PhpClosure::create()
    ->add("path/to/js/my-app.js") // File must exist and be readable
    ->add("path/to/js/popup.js") // File must exist and be readable
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir("path/to/tmp/js-cache/") // Directory must exist and be writable
    ->write();

For compiler options description go to official documentation

Todo

  • Add tests
  • Add file manipulation errors handling