rwoverdijk / assetmanager
An assetmanager module for Laminas.
Installs: 1 964 999
Dependents: 78
Suggesters: 19
Security: 0
Stars: 211
Watchers: 26
Forks: 83
Open Issues: 18
Requires
- php: ^7.3 || ^8.0
- assetic/framework: ^2.0
- laminas/laminas-dependency-plugin: ^2.0
- laminas/laminas-eventmanager: ^2.6.3 || ^3.0.1
- laminas/laminas-loader: ^2.5.1
- laminas/laminas-modulemanager: ^2.7.2
- laminas/laminas-mvc: ^2.7.9 || ^3.0.2
- laminas/laminas-servicemanager: ^2.7.6 || ^3.1.1
- laminas/laminas-stdlib: ^3.2.1
Requires (Dev)
- laminas/laminas-cache: ^2.7.1
- laminas/laminas-console: ^2.6
- laminas/laminas-http: ^2.5.4
- laminas/laminas-view: ^2.8.1
- phpunit/phpunit: ^8.5.8 || ^9.1
- squizlabs/php_codesniffer: ^3.5.6
Suggests
- laminas/laminas-mvc-console: laminas-mvc-console provides the ability to expose laminas-mvc as a console application
- dev-master
- 3.0.0
- 2.x-dev
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.8.1
- 1.8.0
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- dev-deprecated
- dev-hotfix/conflict
- dev-hotfix/merge-conflict
- dev-hotfix/assetic-version
- dev-hotfix/rem-dep
- dev-hotfix/dep-change
- dev-hotfix/version-update
- dev-hotfix/console-bug
- dev-hotfix/license
This package is auto-updated.
Last update: 2024-11-23 13:24:34 UTC
README
By Wesley Overdijk and Marco Pivetta
⚠️ No longer maintained
Every now and then a PR might be merged, but it's probably for the best to use a fork.
PRs without enough reputable approvals will not be merged.
Introduction
This module is intended for usage with a default directory structure of a
LaminasSkeletonApplication. It provides functionality to load
assets and static files from your module directories through simple configuration.
This allows you to avoid having to copy your files over to the public/
directory, and makes usage of assets very
similar to what already is possible with view scripts, which can be overridden by other modules.
In a nutshell, this module allows you to package assets with your module working out of the box.
Installation
- Require assetmanager:
./composer.phar require rwoverdijk/assetmanager
# When asked for a version, type "2.*" when using Laminas. When using Zend Framework type "1.*"
Usage
Take a look at the wiki for a quick start and more information. A lot, if not all of the topics, have been covered in-dept there.
Sample module config:
<?php return array( 'asset_manager' => array( 'resolver_configs' => array( 'collections' => array( 'js/d.js' => array( 'js/a.js', 'js/b.js', 'js/c.js', ), ), 'paths' => array( __DIR__ . '/some/particular/directory', ), 'map' => array( 'specific-path.css' => __DIR__ . '/some/particular/file.css', ), ), 'filters' => array( 'js/d.js' => array( array( // Note: You will need to require the classes used for the filters yourself. 'filter' => 'JSMin', ), ), ), 'view_helper' => array( 'cache' => 'Application\Cache\Redis', // You will need to require the factory used for the cache yourself. 'append_timestamp' => true, // optional, if false never append a query param 'query_string' => '_', // optional ), 'caching' => array( 'js/d.js' => array( 'cache' => 'Apc', ), ), ), );
Please be careful, since this module will serve every file as-is, including PHP code.
Questions / support
If you're having trouble with the asset manager there are a couple of resources that might be of help.
- Join us on gitter
- The FAQ wiki page, where you'll perhaps find your answer.
- RWOverdijk at irc.freenode.net #zftalk.dev or #spoonx
- Issue tracker. (Please try to not submit unrelated issues).
Todo
The task list has been slimmed down a lot lately. However, there are still a couple of things that should be done.
- Renewing the cache