Download the PHP package heimrichhannot/contao-encore-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-encore-bundle. 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 contao-encore-bundle

Contao Encore Bundle

Latest Stable Version Total Downloads CI Coverage Status

Use the power and simplicity of symfony webpack encore in contao. This bundle let you decide on layout and page level, which encore entries should be loaded. If you want more, you can prepare your bundles define their own encore entries, so never need to manually add or remove encore entries again.

Features

Setup

Prerequisites

Prepare your project and bundle

Setup your project for encore bundle:

:arrow_right: Project setup

:arrow_right: Bundle setup

Run Encore

  1. Run encore prepare command

    php vendor/bin/contao-console huh:encore:prepare

  2. If (yarn) dependencies have changed, run yan install

    yarn install

  3. Run encore to generate the assets

    yarn encore dev

  4. Activate encore entries in the contao backend (if not added from code)

Usage

Activate encore entries

  1. In the contao backend, go to page layout configuration
  2. Check "Activate Webpack Encore" and fill the mandatory fields
  3. If you have a main project bundle entry containing the main stylesheets, add it as active entry, add also all other entries you want to have activated on every page.
  4. For page specific features, you can activate additional entries in page setting (site structure).
    • Be aware, that child pages will inherit settings from their parants
    • Pay attention that you check entries as active (if you want them to be loaded)!
    • If you want an already added entry to be not loaded on an specific page, select it as entry and don't check "active".

Prepare command

php vendor/bin/contao-console huh:encore:prepare

The prepare command must be executed after every change to the encore entries configuration, e.g. after a composer update or changes to that configurations in your own code.

The command collect encore entries from all bundle and creates a file called encore.bundles.js in your project root. This file contains entries for all contao encore compatible bundles that are added by calling encoreBundles.addEntries(); in your webpack.config.js.

It also collects the dependencies from the package.json files of bundles have EncoreExtensions registered and adds them to the project dependencies.

Run encore

Run encore to generate/compile your assets.

yarn encore dev 
yarn encore dev --watch 
yarn encore prod

Documentation

Project setup - Prepare your contao project for use with encore and encore bundle

Bundle setup - Add encore bundle support to your bundle

Setup Javascript - Help about setting up your encore entries

Developer Documentation

Configuration Reference


All versions of contao-encore-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
composer-runtime-api Version ^2.0
contao/core-bundle Version ^4.13 || ^5.0
heimrichhannot/contao-encore-contracts Version ^1.0
heimrichhannot/contao-multi-column-editor-bundle Version ^2.0
heimrichhannot/contao-utils-bundle Version ^2.231.0 || ^3.0
symfony/cache Version ^5.4 || ^6.0
symfony/config Version ^5.4 || ^6.0
symfony/console Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/filesystem Version ^5.4 || ^6.0
symfony/http-foundation Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
symfony/translation Version ^5.4 || ^6.0
symfony/translation-contracts Version ^1.1.6 || ^2.0 || ^3.0
symfony/webpack-encore-bundle Version ^1.0 || ^2.0
twig/twig Version ^1.38.3 || ^2.7 || ^3.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 heimrichhannot/contao-encore-bundle contains the following files

Loading the files please wait ....