Download the PHP package pxlbros/lightncandy-cli without Composer

On this page you can find all versions of the php package pxlbros/lightncandy-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lightncandy-cli

LightnCandy-CLI

LightnCandy-CLI is a CLI wrapper around the PHP implementation of mustache/handlebars LightnCandy. This CLI tool can be used in your build process to compile mustache/handlebars templates to PHP to be used with the LightnCandy library or on their own.

Installation

LightnCandy-CLI is meant to be used as a CLI tool and can be globally installed with composer like so: composer global require pxlbros/lightncandy-cli Make sure you have ~/.composer/vendor/bin/ in your path.

You can also install LightnCandy-CLI into your project directory and run it straight from the vendor folder if you want to.

Usage

Basic

The first and only unamed argument is a path to the template file that you wish to compile.

$ lightncandy path/to/template.hbs

If omitted, LightnCandy-CLI will use STDIN as the template. This is usefull because you can pipe input into the utility.

$ echo 'Hello {{name}}!' | lightncandy

By default LightnCandy-CLI will pipe the compiled template to STDOUT but you can also write the output to disk by providing a path.

$ lightncandy path/to/template.hbs -o path/to/output.php

LightnCandy Options

LightnCandy supports many flags that can be used to configure how it compiles your templates. A list of these options and what they do can be found on the page for the LightnCandy library. You can toggle them like so:

$ lightncandy path/to/template.hbs --FLAG_BARE --FLAG_HANDLEBARSJS

You can also use $ lightncandy --help to see a list of availible options and their descriptions in your command line.

Other Options

basedir

-b/--basedir "path/to/partials/directory/ path/to/different/dir" Space seperted list of directory paths containing partial templates.

helpers

-p/--helpers "path/to/helpers/directory/ path/to/different/dir" Space seperated list of directory paths containing helper functions.

blockhelpers

-k/--blockhelpers "path/to/blockhelpers/directory/ path/to/different/dir" Space seperated list of directory paths containing block helper functions.

hbhelpers

-h/--hbhelpers "path/to/hbhelpers/directory/ path/to/different/dir" Space seperated list of directory paths containing handlebars style helper functions.

fileext

-e/--fileext ".tmpl .partial" Space seperated list of file extensions for template files.

render

-r/--render If provided, will run the compiled template and will output the result instead.

data

-d/--data JSON string to pass to the rendering function if the render flag is provided.

compress

-c/--compress Compress the output to reduce file size by around 30%.


All versions of lightncandy-cli with dependencies

PHP Build Version
Package Version
Requires nategood/commando Version *
zordius/lightncandy Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pxlbros/lightncandy-cli contains the following files

Loading the files please wait ...