Download the PHP package smv7/smarty-asset-bundle without Composer

On this page you can find all versions of the php package smv7/smarty-asset-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 smarty-asset-bundle

Smarty 5 Asset Bundle

Combine, minify and preload CSS/JS assets in Smarty 5 with zero‑blocking and automatic HTTP/3 Link headers.

Features

Install

Quick Start

Usage in Templates

Basic bundle

With preload

Inline content

Media queries & async loading

Configuration

AssetBundle constructor options

Option Required Description
cache_dir yes Absolute path to writable cache folder
cache_url yes Base URL for cached bundles (no trailing slash)
document_root yes Server document root (for file resolution)
enable_apcu no Enable APCu preload learning (default: auto-detected)

{bundle} parameters

Parameter Type Description
input array|string File(s) to bundle
content string Inline CSS/JS content (instead of files)
type string Force type css or js (auto‑detected)
preload bool Emit Link preload header for this resource
defer bool Add defer attribute (JS only)
async bool Add async attribute (JS only)
media string CSS media query
onload string JavaScript to run when CSS loads

Advanced

Send preload headers early

Call sendCachedPreloads() before any output to let the browser discover critical resources sooner. You can pass a template name (used as APCu key).

Disable APCu learning

Clear cache

Manually delete all files in cache_dir or use the cache manager’s method if you expose it:

Requirements

Troubleshooting

Empty src/href attributes on Windows
Make sure all paths use forward slashes. The latest version normalises paths automatically – update to the current release.

Cache not written
Check that cache_dir exists and is writable by the web server.

Preload headers not sent
Verify APCu is installed and enable_apcu is true. Headers are sent only once per request.

Double slashes in URLs
Do not add a trailing slash to cache_url – the library adds it internally.

APCu required warning during install
The package checks for APCu; if you don’t need preload, you can ignore the warning or set enable_apcu to false in config.

License

MIT


All versions of smarty-asset-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-apcu Version *
smarty/smarty Version ^5.7
wikimedia/minify Version ^2.10
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 smv7/smarty-asset-bundle contains the following files

Loading the files please wait ...