Download the PHP package gitterdoc/critical without Composer

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

:boom: How it work's?

This package will resolve needed styles and pack it to the header. The rest of additional styles will be appended to the body and will be loaded after the page is ready. Warranty for google Pagespeed up to 100% and compatible with Bootstrap!

google PageSpeed: Desktop google PageSpeed: Mobile

:books: Installation

Go to your root directory of your laravel project and install the package with composer:

And add the configuration's file to your laravel instance:

:bulb: Usage

Go into your Blade template and replace your Stylesheets and add the same to the end of the body by expecting the second parameter!

:hammer: API

{{ critical($file, $type) }}

This method will handle your stylesheets.

Parameter Type Default Description
$file String required The stylesheet, that will be handled
$type boolean true It's an include for your header or your footer? (header = true, footer = false)

:wrench: Settings

You can change the settings on the config/critical.php file.

Name Type Default env Description
:white_check_mark: enabled boolean true CRITICAL_ENABLED Enable or disable the Critical module
:memo: onlyprint boolean true CRITICAL_ONLY_PRINT Describes the handling - true - Only stylesheets will be printed, no more handling - false - Each site request will be parsed to find specific styles
:zap: caching Array
enabled boolean true CRITICAL_CACHE_ENABLED Enable or disable the caching
time integer 3600 CRITICAL_CACHE_TIME Set the maximal cache lifetime of the cache in seconds (3600 = 1 hr)
:scroll: noscript boolean true CRITICAL_NOSCRIPT Adding original stylesheet as <noscript> for browsers, that don't have JavaScript enabled

:fire: Support us!

I'm a excellent and professional web- & software developer but i don't work anymore in these branche. I spend some free time to create awesome content. Support me by liking my repositorys :heart_eyes: or spend me a coffee :coffee:!



All versions of critical with dependencies

PHP Build Version
Package Version
Requires masterminds/html5 Version 2.*
sabberworm/php-css-parser Version *
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 gitterdoc/critical contains the following files

Loading the files please wait ....

© 2017 - 2025 Weber Informatics LLC
https://packagist.org/packages/gitterdoc/critical https://gitterdoc.com