NAME

Dist::Zilla::Plugin::JSAN::Bundle - Bundle the library files into "tasks", using information from Components.JS

VERSION

version 0.06

SYNOPSIS

In your dist.ini:

[JSAN::Bundle]

In your Components.JS:

COMPONENTS = {
    
    "Core" : [
        "KiokuJS.Reference",
        
        "KiokuJS.Exception",
        "KiokuJS.Exception.Network",
        "KiokuJS.Exception.Format",
        "KiokuJS.Exception.Overwrite",
        "KiokuJS.Exception.Update",
        "KiokuJS.Exception.Remove",
        "KiokuJS.Exception.LookUp",
        "KiokuJS.Exception.Conflict"
    ],
    
    
    "Prereq" : [
        "=/home/cleverguy/js/some/file.js",
        "jsan:Task.Joose.Core",
        "jsan:Task.JooseX.Attribute.Bootstrap",
        
        "jsan:Task.JooseX.Namespace.Depended.NodeJS",
        
        "jsan:Task.JooseX.CPS.All",
        "jsan:Data.UUID",
        "jsan:Data.Visitor"
    ],
    
    
    "All" : [
        "+Core",
        "+Prereq"
    ]
} 

DESCRIPTION

This plugins concatenates several source files into single bundle using the information from Components.JS file.

This files contains a simple JavaScript assignment (to allow inclusion via <script> tag) of the JSON structure.

First level entries of the JSON structure defines a bundles. Each bundle is an array of entries.

Entry, starting with the "=" prefix denotes the file from the filesystem.

Entry, starting with the "jsan:" prefix denotes the module from the jsan library. See Module::Build::JSAN::Installable.

Entry, starting with the "+" prefix denotes the content of another bundle.

All other entries denotes the javascript files from the "lib" directory. For example entry "KiokuJS.Reference" will be fetched as the content of the file "lib/KiokuJS/Reference.js"

All bundles are stored as "lib/Task/Distribution/Name/BundleName.js", assuming the name of the distrubution is "Distribution-Name" and name of bundle - "BundleName". During release, all bundles also gets added to the root of distribution as "task-distribution-name-bundlename.js". To enable the latter feature for regular builds add the `roots_only_for_release = 0` config option

AUTHOR

Nickolay Platonov <nplatonov@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Nickolay Platonov.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.