The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

JavaScript::Sprockets - create javascript concatenations

VERSION

Version 0.03

SYNOPSIS

Create javascript concatenations using the sprockets command-line tool. Read more about why using sprockets is useful at http://getsprockets.org.

    use JavaScript::Sprockets;

    my $sp = JavaScript::Sprockets->new(
      load_paths => ["src/javascripts", "vendor/jquery"],
    );

    # a concatenation of app.js and its requirements
    my $concat = $sp->concatenation("app.js");

CONSTRUCTOR

new

Optional parameters include

root

Change to this directory before doing anything.

load_paths

Search these directories for files. Takes an array reference.

bin

A path to the sprocketize program.

METHODS

concatenation

Build a concatention for the provided file.

add_load_path

Adds the provided directory to the load_path.

remove_load_path

Remove the provided directory from the load_path.

AUTHOR

Lee Aylward, <leedo at cpan.org>

BUGS

Please report any bugs or feature requests to bug-javascript-sprockets at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=JavaScript-Sprockets. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc JavaScript::Sprockets

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2010 Lee Aylward.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.