Download the PHP package elephfront/robo-js-minify without Composer

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

Robo JS Minify

Build Status Codecov

This Robo task performs a minification of your JS content.

This task performs the minification using matthiasmullie/minify library.

Requirements

Installation

You can install this Robo task using composer.

The recommended way to install composer packages is:

Using the task

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

The only argument the taskJsMinify() takes is an array ($destinationsMap) which maps the source files to the destination files : it will load the assets/js/main.js, do its magic and put the final content in assets/min/js/main.min.js and do the same for all of the other files.

GZIP compression

In addition to minifying your files, you can gzip them. You can enable gzip using the enableGzip() method :

By default, files will be compressed using the maximum level (which is 9). You can customize the compression level using the method setGzipLevel() :

The setGzipLevel accepts values from -1 to 9. If you use -1, the default compression level of the zlib library will be used. 0 means you do not want any compression and 9 is the maximum level of compression. If you use a value that is out of these bounds, the maximum compression level will be used.

Chained State support

Robo includes a concept called the Chained State that allows tasks that need to work together to be executed in a sequence and pass the state of the execution of a task to the next one. For instance, if you are managing assets files, you will have a task that compile SCSS to CSS then another one that minify the results. The first task can pass the state of its work to the next one, without having to call both methods in a separate sequence.

The robo-js-minify task is compatible with this feature.

All you need to do is make the previous task return the content the robo-js-minify task should operate on using the data argument of a Robo\Result::success() or Robo\Result::error() call. The passed data should have the following format:

In turn, when the robo-js-minify task is done, it will pass the results of its work to the next task following the same format.

Preventing the results from being written

By default, the robo-js-minify task writes the result of its work into the destination file(s) passed in the $destinationsMap argument. If the robo-js-minify task is not the last one in the sequence, you can disable the file writing using the disableWriteFile() method. The files will be processed but the results will not be persisted and only passed to the response :

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-js-minify with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
consolidation/robo Version *
matthiasmullie/minify Version ^1.3
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-js-minify contains the following files

Loading the files please wait ....