Download the PHP package cbl/blade-script without Composer

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

Blade Script

A package to easily add transpiled & minified scripts to your blade components.

Introduction

In case you want to add javascript functionality to a blade component, you can write it directly in the script tag. However, the script will then not be minified and if a component is used multiple times, the script tag will also be included multiple times.

Blade Script solves these problems. The javascript code can be minified in production and each script tag is only included once all without running a compiler separately. Also only required scripts are included.

Additionally there is the possibility to add transpilers like babel.

Installation

The package can be easily installed via composer.

Now the necessary assets must be published. This includes the script.php config and the storage folder where the compiled scripts are stored.

Include Scripts

The blade component x-scripts includes all required scripts, so it may be placed at the very bottom of your body.

Usage

Each blade component can contain exactly one x-script component. Your scripts can then be written inside the wrapper like so.

Optimizing Scripts

Blade scripts share the same behavior as Views. As suggested in the View documentation, the script:cache command can be added to your deployment workflow to ensure that all scripts are compiled and thus improve performance.

You may use the script:clear command to clear the script cache:

Write Transpiler

You can easily add transpilers to the compiler, the following example explains how to create and include a transpiler.

First you have to create a transpiler class that implements the BladeScript\Contracts\Transpiler contract.

The transpiler can now be added to the compiler in your service provider like so:


All versions of blade-script with dependencies

PHP Build Version
Package Version
Requires matthiasmullie/minify Version 1.3.16
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 cbl/blade-script contains the following files

Loading the files please wait ....