NAME

Mojolicious::Command::bundle - Bundle assets from other projects

VERSION

0.01

DESCRIPTION

Mojolicious::Command::bundle is a command for fetching online assets and bundle them with your project.

Bundling are done with git, where the remote repository is added to the current git project. The files are then copied into a assets/vendor/some-repository directory. Updating the files to the latest remote version is as easy as running the same command again, or optionally with a different version.

The git process is not accomplised using submodules, nor subtree. The reason is that it seems a lot more flexible being able to jump between branches and tags as you like.

Please submit and issue if you have defined your own "custom" repository.

SYNOPSIS

Usage:

$ mojo bundle <repo> <version>
$ mojo bundle materialize
$ mojo bundle materialize v0.97.1

REPOSITORIES

bootstrap

Bundle the http://getbootstrap.com/ project.

materializecss

Bundle the http://materializecss.com/ project.

See Mojolicious::Command::bundle::materialize for more details.

custom

This is not a real repository, but it is possible to specify locations with a config file in the current working directory:

$ cat - > .mojo_bundle.json
{
  "materialize": {
    "download_url": "https://github.com/Dogfalo/materialize/archive/$version.tar.gz",
    "git_url": "https://github.com/Dogfalo/materialize.git"
  }
}

The content of this file will be merged with the default "repositories".

"download_url" is only required as a fallback, in case git is not installed.

ENVIRONMENT VARIABLES

GIT_BIN

Path to your "git" executable. The default is to use which to find the executable.

MOJO_ASSET_OUT_DIR

Path to where the root of the repositories should be. Defaults to "assets/vendor".

ATTRIBUTES

description

$str = $self->description;

Returns short description of this command.

repositories

$hash_ref = $self->repositories;

Holds a mapping between repository name and resource URLs. See "REPOSITORIES" for default value.

usage

$str = $self->usage;

Returns how to use this command.

METHODS

run

Command start point.

COPYRIGHT AND LICENSE

Copyright (C) 2014, Jan Henning Thorsen

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org