GithubHelp home page GithubHelp logo

rud5g / assetmanager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rwoverdijk/assetmanager

0.0 2.0 0.0 251 KB

AssetManager written for zf2. Managing assets for zend framework 2

License: BSD 2-Clause "Simplified" License

assetmanager's Introduction

AssetManager 1.3.1

By Wesley Overdijk and Marco Pivetta

Note: This version includes a possible BC-break as it has switched to a different tag of assetic.

Build Status

Introduction

This module is intended for usage with a default directory structure of a ZendSkeletonApplication. 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

  1. Require assetmanager:
./composer.phar require rwoverdijk/assetmanager
#when asked for a version, 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',
                ),
            ),
        ),
        '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.

Todo

The task list has been slimmed down a lot lately. However, there are still a couple of things that should be done.

  • Warming up the cache
  • Renewing the cache

assetmanager's People

Contributors

basz avatar evandotpro avatar internalsystemerror avatar mabuzagu avatar ocramius avatar rwoverdijk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.