Download the PHP package illuminatech/override-build without Composer

On this page you can find all versions of the php package illuminatech/override-build. 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 override-build

Laravel Materials Build Override


This extension allows re-building materials from 3rd party libraries with patch.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads Build Status

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json.

Usage

This extension allows re-building materials from 3rd party libraries with patch. It might be in handy while using some extension, which is shipped with already compiled JavaScript files, which you need to modify and thus re-compile. For example: extensions for 3rd party CMS like Nova.

We can take froala/nova-froala-field for example. This package is shipped with JavaScript WYSIWYG editor integrated into VueJS component, which are compiled altogether into a single '*.js' file. In case you need to apply custom plugin to the editor, it becomes impossible unless you re-compile the extension with your own changes.

At this stage it might be tempting to simply adjust source files inside 'vendor/froala/nova-froala-field' directory and run NPM build from there. However any manual changes inside the 'vendor' directory will cause you problems in the future. The patch you create in this way can not be tracked by VCS and you will have to re-apply it in case you update the library. Also any changes made to the files in "vendor" directory may cause Composer fail on 'install' or 'update' command.

This package was created to solve the problem. It allows creating new build (compilation) from particular source files under the different path. This task is performed in following steps:

Heads up! Actually re-building 3rd party materials in this way is a hack. You should not use it unless you can not achieve your goal using other means.

Application configuration

This extension uses illuminatech/array-factory for configuration. Make sure you are familiar with 'array factory' concept before configuring this extension. Configuration is stored at 'config/override-build.php' file.

You can publish predefined configuration file using following console command:

Inside the configuration file you'll have to define the list of packages you wish to re-build. For our 'Froala' example the configuration may look like following:

Each package specification is an 'array factory' compatible configuration for the \Illuminatech\OverrideBuild\Builder instance. Please refer to \Illuminatech\OverrideBuild\Builder class for more details about particular options.

Once configuration is complete you are able to run re-build using 'override-build' artisan command. This command accepts the package name from the configuration as an argument, specifying which package should be re-built. For example:

Heads up! Remember that this extension will not reconfigure the built package in the way it will use new compiled files. You will have to manually adjust configuration of extension you modifying yourself. For the 'Nova Froala field' example you should adjsut your \App\Providers\NovaServiceProvider in following way:

Overriding files

You would not need to re-build some package without making any modifications to its source. The easiest way to do so is using the 'override' directory. It should repeat the structure of the source directory containing only those files, which should be appended or replaced. In our example for the 'Nova Froala field' the source directory has the following structure:

The override directory structure for it may look like following:

Its application will replace 'resources/js/field.js' file and append 'resources/js/custom-plugins.js'.

While original 'resources/js/field.js' file content looks like following:

The override may contain extra code adding the custom editor plugins defined in 'resources/js/custom-plugins.js' file:

Patching files

While complete overriding of the source file is the most simple way to apply your modifications, it has some significant drawbacks. You will need to copy all original file content into the override and then make your modification, even if changes a single line of code. In case source library upgrades, it may change the file, which you have overridden, in the way build ends with an error with your version. In order to make your changes more persistent \Illuminatech\OverrideBuild\Builder::$patches has been created. Each patch is a PHP object matching \Illuminatech\OverrideBuild\PatchContract, which modifies file content. Following pre-defined patches are available:

Please refer to the particular patch class for more details.

For our 'Nova Froala field' example we can simply patch 'resources/js/field.js', adding an extra line with require('./custom-plugins'); instead of rewriting it as whole.

Build optimization

In order to speed up the building process, 'override-build' checks whether package build already exist before making new one. If build exists and its files modification date is later then modification date of files from 'source' and 'override' directories - no new build will be started. You may enforce build re-creation using --force flag for the command invocation. For example:

Cleanup files

During the building some accessory files, which you may not want to keep, might be generated. Like during our 'Nova Froala field' example building, 'node_modules' directory created with all NPM dependencies stored inside of it. In order to simplify project structure and save disk space you can setup \Illuminatech\OverrideBuild\Builder::$cleanupFiles, listing files and directories, which should be removed after build is complete. For example:


All versions of override-build with dependencies

PHP Build Version
Package Version
Requires illuminate/console Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
illuminate/filesystem Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
illuminatech/array-factory Version ^1.2.5
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 illuminatech/override-build contains the following files

Loading the files please wait ....