Download the PHP package bor-attila/cakephp-rollup without Composer

On this page you can find all versions of the php package bor-attila/cakephp-rollup. 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 cakephp-rollup

Rollup plugin for CakePHP

This plugin it's not really about the code, it just gives you a structure how to handle CSS/JS, and some helper method.

SEO is not a problem ? You want a full client-side rendered frontend ? Then maybe you should check inertiajs. SEO or SSR is not a problem ? You want to use CakePHP as a backend and build the entire frontend in JS ? Then you should check vuejs. You want just an 'assetcompressor' ? Then you should check markstory/asset_compress

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

Enable the plugin in your Application.php:

As package manager. I will use yarn, but you can use npm if you want.

Create a package.json in the webroot directory with yarn if you don't have one.

Create the default folder structure and create the basic files.

After you successfully executed this command, your WEBROOT directory should look like this.

The css folder contains the compiled stylesheets. You can add this line to gitignore

The scss folder contains the stylesheet source code. The plugins folder contains static production ready third party libraries (eg. bootstrap, axios, select2). The js folder contains the compiled javascript files. You can add this line to gitignore

The js/src folder contains javascript app(!) source files - vue, react etc... Eg: x.app.js, y.app.js. The js/src/components folder contains javascript app components source files. The js/src/mixins folder contains javascript reusable components. The js/src/static folder contains javascript source code that can be included directly into page ('old way').

Working with stylesheets

Install dependencies:

You will need DartSDK installed!

Add these scripts into your package.json

SCSS commands

Production

When you run yarn rollup:scss:build all sass files from scss folder which starts with a letter (^[a-zA-Z]) will be compiled into css and minimized.

For example:

Development

When you run yarn rollup:scss:watch all sass files from scss folder which starts with a letter (^[a-zA-Z]) will be compiled into css and the sass compiler will listen to file changes.

Helpers

CSS helper

In View\AppView.php add this to the initialize method for expl:

OR

The CSS helper is just an array manipulation. In the container you can store class names.

StyleSheet helper

In View\AppView.php add this to the initialize method:

The StyleSheet helper helps to load CSS file content and inject it directly into the body. These methods search for specified CSS files, opens, creates a style tag and stores it into cache (if it's set).

Returns the global stylesheet's content. Automatically searches for the css/style[.hash]?[.min]?.css You can add more CSS files as parameter.

Returns the local stylesheet's content. Automatically searches for:

Returns the given stylesheet's content. Automatically searches for the css/{name}[.hash]?[.min]?.css

Working with Javascript

Install dependencies:

Add these scripts into your package.json

Helpers

Javascript helper

In View\AppView.php add this to the initialize method:

How to use:


All versions of cakephp-rollup with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
cakephp/cakephp Version 4.x
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 bor-attila/cakephp-rollup contains the following files

Loading the files please wait ....