Download the PHP package nswdpc/silverstripe-async-loader without Composer

On this page you can find all versions of the php package nswdpc/silverstripe-async-loader. 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 silverstripe-async-loader

Async Requirements Loader

This module provides a backend to load requirements asynchronously using loadjs

The goal is to make requirements loading light without blocking page load and to support the separation of critical and non-critical requirements.

loadjs itself is loaded as an inline script within the page

Supports Silverstripe 4.0+

Usage example

Bundles

loadjs uses dependency 'bundles' to manage loading of scripts.

Default requirements bundle

For backwards compatibility scripts loaded via are loaded by loadjs in series and assigned to the bundle 'requirements_bundle'

See Section 3 of the loadjs documentation

Once all scripts are loaded, a callback is fired and dispatches a DOM event

Custom scripts that require a script to be loaded prior to firing can listen for this DOM event:

Specific bundles

Scripts that do not depend on anything loaded in a default bundle can be loaded in a non blocking way in their own bundle:

Optionally with a callback... if you need to do something after a bundle loads

See Section 1 of the loadjs documentation

You can include multiple scripts in the bundle

See Section 2 of the loadjs documentation

CSS

CSS requirements are loaded in blocking mode by default within the tag.

You can alternatively load CSS in non-blocking mode via a backend bundle:

Be aware that unless you load in styles that set up a basic/acceptable above-the-fold layout, you will most likely get a FOUC until stylesheets loaded this way are applied. It's fast, but ugly.

Refer to Section 5 of the loadjs documentation on CSS loading notes.

Page placement

If you wish, place the HTML comment in your page template where you would like JS requirements to be placed. The backend will replace this comment with the JS requirements found. If you do not do this, the JS requirements will be loaded before the closing body tag.

Custom scripts

If you have custom scripts that assume a library is loaded, these will most likely fail unless they are run after their dependency loads. To ensure that they run correctly, apply them in the relevant bundle callback or in an event listener for

Custom head tags

These are loaded prior to the closing head tag.

TODO

Licences

BSD 3-Clause


All versions of silverstripe-async-loader with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ~4.0
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 nswdpc/silverstripe-async-loader contains the following files

Loading the files please wait ....