Download the PHP package elephfront/robo-live-reload without Composer

On this page you can find all versions of the php package elephfront/robo-live-reload. 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 robo-live-reload

Robo Live Reload

Build Status Codecov

This Robo task starts a Live Reload server when using Elephfront.

If you use the base Elephfront skeleton, it will be fired up when you start the serve command. Whenever you edit a file, it will trigger the related commands and triggers a refresh in the browsers connected to the Elephfront server. For instance, if you edit a SASS file, it will compile the SASS source to CSS, minify the results and automatically trigger a refresh in your browser.

The Live Reload server is powered by compilation using the ratchetphp/Ratchet using a WebSocket server.

You can of course use it outside of an Elephfront project.

Requirements

Installation

You can install this Robo task using composer.

The recommended way to install composer packages is:

Implementation

In order to work, this task needs two things :

Using the task

You can load the task in your RoboFile using the LoadLiveReloadTaskTrait trait:

The LiveReload task has some utility methods that will give you the ability to customize the server launched.

host()

Gives you the ability to change the host the server will be hosted on. By default : 127.0.0.1.

port()

Gives you the ability to change the port the server will be hosted on. By default : 22222.

bin()

Gives you the ability to change the bin path where the script that will start the Live Reload server is located. By default : vendor/bin.

jsPath()

Gives you the ability to change the path where the javascript file needed to make the browser listen to the Live Reload server and force the refresh will be located. By default, it will put it in the expected location of the build directory of an Elephfront project : build/system/LiveReload/assets/js/livereload.js. Based on your project setup, you may have to customize this value.

Notifying the LiveReload server

To send a message to the Live Reload server so it can propagate it to the browser and the reload triggered, you can use the sendReloadMessage() of the task::

This will send a "reload" message to the Live Reload server. If you load the livereload.js file created by the task, your browser will automatically reload when this message is received.
Typically, you will use this method when using a "watch" behavior so a reload can be triggered after your watch handler has been executed.

If you want to send another message to extend the behavior of the Live Reload server, you can have access to the WebSocket client using the getWsClient() method and send the message you want :

Contributing

If you find a bug or would like to ask for a feature, please use the GitHub issue tracker. If you would like to submit a fix or a feature, please fork the repository and submit a pull request.

Coding standards

This repository follows the PSR-2 standard.

License

Copyright (c) 2017, Yves Piquel and licensed under The MIT License. Please refer to the LICENSE.txt file.


All versions of robo-live-reload with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
consolidation/robo Version *
cboden/ratchet Version ^0.3.6
textalk/websocket Version ^1.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 elephfront/robo-live-reload contains the following files

Loading the files please wait ....