Skip to content

Conga.js bundle for asset merging and minfication using connect-assetmanager

Notifications You must be signed in to change notification settings

congajs/conga-assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

conga-assets

Overview

This is a bundle for the Conga.js framework which handles the merging and minification of javascript and css assets using the connect-assetmanager module.

Configuration

Example:

// config.yml
assets:

    # enable asset compilation
    enabled: true
    
    # should a version be appended
    appendVersion: true
    
    # version parameter name (/js/src.js?v=1234)
    versionParameter: v
    
    # version number to append to querystrings
    version: v1.0
    
    # custom defined tags and asset paths
    tags:
        js-plugins:
            type: javascript
            path: %kernel.app_public_path%
            route: /js/conga.plugin.js
            files:
                - /bundles/conga-socketio/js/conga-socketio.js
        
        css-all:
            type: css
            path: %kernel.app_public_path%
            route: /css/all.css
            files:
                - /js/lib/bootstrap/dist/css/bootstrap.css
                - /bundles/demo-bundle/css/styles.css
    
    # templates to parse asset paths from
    templates:
        - demo-bundle:layout.jade
        - demo-bundle:chat/index.jade

Usage

To combine assets in your templates, use the provided assets() template helper.

asset(destination, assetType, sourceFiles)

Jade example:

# layout.jade
!= assets('/js/src.js', 'javascript', ['/js/user.js', '/js/jst.js', '/bundles/demo-bundle/js/*'])

About

Conga.js bundle for asset merging and minfication using connect-assetmanager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published