Download the PHP package cloudgrayau/pitch without Composer

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

Pitch for Craft CMS 4/5

On the go SCSS compiling, CSS/JS minifying, merging and caching.

Requirements

This plugin requires Craft CMS 4.0.0 or later.

Installation

composer require cloudgrayau/pitch

Pitch Overview

Pitch is a plugin that allows for on the go SCSS compiling, CSS/JS minifying, merging and caching.

Configuring Pitch

SCSS compiling uses the latest version of scssphp and two output styles are included:

CSS and JS minifying uses the 'MatthiasMullie\Minify' package (which can be disabled via the settings).

Caching is enabled by default (recommended) and the cache directory and duration can be customised.

Advanced Caching Mode

Advanced Caching Mode can also be enabled, which offers superior performance but requires server rewrites and changes to the default storage path. For instructions on how to setup Advanced Caching Mode, please refer to the ADVANCED.md.

Using Pitch

For example files, please browse to the /vendor/cloudgrayau/pitch/examples/ directory for installation.

You can now compile inline SCSS and minify CSS/JS directly via your templates in Twig.

Further instructions for the inline method are found below.

Merging & Loading Files

SCSS

{% do view.registerCssFile(url('scss/style.scss')) %} will load and compile the following SCSS file:

{% do view.registerCssFile(url('scss/assets/style,chosen,plugin/owl.scss')) %} will merge and compile the following SCSS files:

All files being merged will need to have the .scss extension.

In SCSS, $baseUrl refers to the relative @web directory (no trailing slash).


CSS

{% do view.registerCssFile(url('css/style.css')) %} will load and minify the following CSS file:

{% do view.registerCssFile(url('css/assets/style,chosen,plugin/owl.css')) %} will merge and minify the following CSS files:

All files being merged will need to have the .css extension.


JS

{% do view.registerJsFile(url('js/script.js')) %} will load and minify the following JS file:

{% do view.registerJsFile(url('js/assets/script,chosen,plugin/owl.js')) %} will merge and minify the following JS files:

All files being merged will need to have the .js extension.

In JS, $baseUrl refers to the relative @web directory (no trailing slash).


You can also force the browser to re-cache asset files by using :DIGIT in the asset URL prior to the extension, for example 'js/assets/site,plugin/chosen:01.js'.

Whilst in development mode, the browser cache of all assets will be forced to refresh on each page load.

Inline Compiling & Minifying

You can now compile inline SCSS and minify CSS/JS directly via your templates in Twig, as follows:

Please note, the @import command in SCSS, will be relative to the @web directory.

I would highly recommend that the inline method is inclosed in {% cache %}{% endcache %} tags for performance reasons.

The Inline Compiling & Minifying integrates great with the Code Field from @nystudio107.

Clearing Cache

The Pitch cache can be cleared via the following methods:

  1. Via the CraftCMS Settings => Pitch
  2. Via the CraftCMS Utilities => Caches
  3. Via the console ./craft pitch/clear

Brought to you by Cloud Gray Pty Ltd


All versions of pitch with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^4.0|^5.0
scssphp/scssphp Version ^1.12.1
matthiasmullie/minify Version ^1.3.71
php Version ^8.0|^8.2
cloudgrayau/utils Version ^1.1
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 cloudgrayau/pitch contains the following files

Loading the files please wait ....