Download the PHP package nsrosenqvist/blade-cli without Composer

On this page you can find all versions of the php package nsrosenqvist/blade-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 blade-cli

Blade CLI

Blade CLI is a command line compiler for the Laravel Blade templating engine. You simply specify what templates you want to process as arguments.

Installation

To install you can either clone this repo and run composer install && composer build or simply retrieving the latest PHAR from the releases page.

I also have a convenience feature configured that install the PHAR to /usr/bin by running composer build:install but it makes a whole lot of assumptions of your OS and probably only works on Linux and macOS. Use at your own risk.

Usage

php blade-cli.phar [options] [--] <template> (<template>)...

Arguments

Argument Details
<template> The template path can be specified as a relative URI, absolute and also as how Blade natively handles include references (pages/index.blade.php vs pages.index). If supplied as a Blade reference then a base directory must be set

Options:

Option Details
--data=DATA Variables passed on to the template as a JSON file/string or a PHP file returning an associative array (multiple values allowed)
--output-dir=OUTPUT-DIR Output path relative from current working directory or absolute
--base-dir=BASE-DIR Base directory to look for template files from. If not set, template's containing dir is assumed (multiple values allowed)
--output-ext=OUTPUT-EXT When an output dir is specified you can also set what file extension the compiled template should be created with [default: "txt"]
--extend=EXTEND This option accepts a path to a PHP file with user code to extend the compiler by using $compiler->extend()
--dynamic-base Automatically add the parent directories of all templates as base directories. This requires a new Blade compiler instance for each template file which adds overhead but simplifies processing multiple templates at once and have each be a self-contained template hierarchy tree. This is not compatible with templates supplied as native Blade references
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v/vv/vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Development

Clone and run composer install. You can then run the app by executing php bin/blade from the root directory. To create a distributable PHAR you run composer build. To verify that templates are processed correctly you can run composer test.


All versions of blade-cli with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
symfony/console Version ^3.2
nsrosenqvist/blade-compiler Version ^1.0.0
symfony/event-dispatcher Version ^3.2
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 nsrosenqvist/blade-cli contains the following files

Loading the files please wait ....